【发布时间】:2015-02-17 03:52:32
【问题描述】:
我正在阅读《Learn Python The Hard Way》这本书,我需要安装 pip.(ex46,ex47) 所以我把get-pip.py 保存在我的电脑和powershell 中:
PS C:\Users\Toto\pip> python Get-pip.py
Downloading/unpacking pip
Installing collected packages: pip
Successfully installed pip
Cleaning up...
但是当我尝试时:PS C:\Users\Toto\pip> pip
我收到此错误:
pip : The term 'pip' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the s
pelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ pip
+ ~~~
+ CategoryInfo : ObjectNotFound: (pip:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
C:\Python27\Scripts\ 已经在我的路径上。
我想不通。如果有人可以请帮助我。
注意:我在 Windows 8 上,这是使用 python 2.7
【问题讨论】:
-
您可能需要将其单独添加到 PATH 环境变量中
-
在
IDLE(用于测试语句的 Python 交互式 shell)中,编写以下命令:import pip。 -
你现在可以从命令行调用
pip了吗? -
如果你不想弄乱 PATH 并假设调用 python 有效,你可以使用“python -m pip ...”而不是“pip ...”
标签: python windows python-2.7 powershell pip