How do I install a Python package with a .whl file?

后端 未结 17 2429
刺人心
刺人心 2020-11-22 00:54

I\'m having trouble installing a Python package on my Windows machine, and would like to install it with Christoph Gohlke\'s Window binaries. (Which, to my experience, allev

17条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-22 01:26

    On Windows you can't just upgrade using pip install --upgrade pip, because the pip.exe is in use and there would be an error replacing it. Instead, you should upgrade pip like this:

    easy_install --upgrade pip
    

    Then check the pip version:

    pip --version
    

    If it shows 6.x series, there is wheel support.

    Only then, you can install a wheel package like this:

    pip install your-package.whl
    

提交回复
热议问题