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

后端 未结 17 2269
刺人心
刺人心 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:12

    On the MacOS, with pip installed via MacPorts into the MacPorts python2.7, I had to use @Dunes solution:

    sudo python -m pip install some-package.whl
    

    Where python was replaced by the MacPorts python in my case, which is python2.7 or python3.5 for me.

    The -m option is "Run library module as script" according to the manpage.

    (I had previously run sudo port install py27-pip py27-wheel to install pip and wheel into my python 2.7 installation first.)

提交回复
热议问题