Python Pip 安装挂起
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/33925566/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Pip Install hangs
提问by Waves
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?
我目前在我的 Windows 机器上安装了 Python 3.5。我正在尝试使用命令“pip install”安装 Python 包,但是一旦我按下 Enter 键,什么也没有发生。该操作挂起很长时间,当我尝试退出命令行时,它冻结了。如何让 pip install 工作?
采纳答案by Waves
@JBernardo 's comment worked for me. Thanks!
@JBernardo 的评论对我有用。谢谢!
python -m pip install some_package_you_want
回答by Adi
Try using pip
programmatically like shown below.
尝试以pip
编程方式使用,如下所示。
import pip
pip.main(['install', 'the_package_you_want_installed'])