Pip Install hangs

2019-04-26 17:37发布

问题:

I currently have Python 3.5 on my Windows machine. I'm trying to install a Python package using the command "pip install" but as soon as I hit enter nothing happens. The action hangs for such a long time and when I try to exit the command line, it freezes. How do I get pip install to work?

回答1:

@JBernardo 's comment worked for me. Thanks!

python -m pip install some_package_you_want


回答2:

Try using pip programmatically like shown below.

import pip

pip.main(['install', 'the_package_you_want_installed'])