pip在Windows python 2.7.9上不起作用 [英] pip not working on windows python 2.7.9
问题描述
我已经安装了Python 2.7.9,它已经与pip捆绑在一起.我检查了它是否在模块列表中.
但是当我运行pip install
我懂了
SyntaxError: invalid syntax
I've installed Python 2.7.9, which comes with already bundled with pip. I've check that it's there in the modules list.
But when I run pip install
I get
SyntaxError: invalid syntax
将安装突出显示为错误?
With install highlighted as the error?
我做错了什么?
推荐答案
似乎从Python交互式控制台运行pip install
.相反,您应该从Windows控制台(cmd或PowerShell)运行它:
Seems like you are running pip install
from Python interactive console. Instead, you should run it from Windows console (cmd or PowerShell):
python2.exe -m pip install <package_name>
python2.exe
对于Python2.7.9是可执行的(您可能需要包括可执行文件的完整路径),而<package_name>
是要安装的软件包的名称
Where python2.exe
is executable for Python2.7.9 (you may need to include full path to the executable file) and <package_name>
is the name of package you want to install
这篇关于pip在Windows python 2.7.9上不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!