安装软件包时无法识别"pip"命令 [英] 'pip' not recognised command when installing packages
问题描述
我试图通过将以下代码提交到命令提示符来从标准目录的PYPI列表中安装oauth
软件包:
I am trying to install the oauth
package from the PYPI list of standard directories by submitting the following code to command prompt:
pip install oauth==1.0.1
这将安装'oauth'的特定版本1.0.1.但是我收到以下错误消息:
This is to install the specific version 1.0.1 of 'oauth'. However I am getting the following error message:
pip is not recognised as an internal or external command
我在Windows 8上使用Python 3.3,并使用以下命令通过命令提示符安装了Pip:
I am using Python 3.3 on Windows 8 and have installed Pip via Command Prompt using the code:
Get-Pip.py
我在做什么错了?
推荐答案
您的python Scripts
目录未添加到Windows路径.通常,此路径为C:\Python3x\Scripts
,其中x
是您已安装的Python的次要版本(即,对于Python 3.3是3
,对于Python 3.4是4
)
Your python Scripts
directory wasn't added to your Windows path. Typically, this path is C:\Python3x\Scripts
where the x
is the minor version of Python you have installed (ie. 3
for Python 3.3 or 4
for Python 3.4)
添加到路径后,您可以打开一个新的命令提示符并使用pip
.
Once that is added to your path, you can open a new command prompt and use pip
.
如果您不想(或无法)更改path变量,也可以将完整路径添加到命令中以使其起作用
If you don't want (or can't) alter your path variable, you can also add the full path to your command to get it to work
C:\Python3x\Scripts\pip.exe install oauth==1.0.1
同样,x
将遵循上述次要版本的Python的值.
Again, the x
will follow the above values for the minor version of Python.
这篇关于安装软件包时无法识别"pip"命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!