' pip'未被认可
我尝试安装pyside
,但我从PowerShell中获得了以下内容的错误:
pip : The term 'pip' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that
the path is correct and try again.
At line:1 char:1
+ pip install -U PySide
+ ~~~
+ CategoryInfo : ObjectNotFound: (pip:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
I tried to install PySide
but I got error from the powershell as follows:
pip : The term 'pip' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that
the path is correct and try again.
At line:1 char:1
+ pip install -U PySide
+ ~~~
+ CategoryInfo : ObjectNotFound: (pip:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(14)
当一个人试图在命令提示符中使用PIP时,此错误显示在Windows上。
要在Windows上求解此错误,您必须通过以下步骤来声明路径变量:
您将找到一个称为系统变量的部分。
单击
PATH
从位于此处显示的变量列表和值。单击
路径
单击编辑
之后。您会在弹出窗口中找到一个新按钮。单击那并粘贴
python35
或python36
文件夹(您在安装Python时指定的位置)的位置,然后是\ scripts
。对我来说,它的
c:\ users \ a610580 \ appdata \ local \ program \ python \ python \ python35-32
因此,我键入
c:\ user \ a610580 \ appdata \ local \ program \ python \ python \ python35-32 \ scripts
单击
ok ok
关闭所有Windows并重新命令提示符。我重复 - 重新启动您的命令提示符。
现在一切都可以正常工作!
确保您不会在路径变量中打扰其他任何内容,并准确遵循上述步骤。
另外,您可以观看此视频。
This error shows up on windows when one tries to use pip in the command prompt.
To solve this error on windows, you must declare path variable by following these steps:
You will find a section called system variables.
Click on
Path
from the list of variable and values that shows up there.After clicking on
path
clickedit
. You will find a New button in the pop up.Click that and paste the location of the
python35
orpython36
folder (The location you specified while installing python) followed by\Scripts
there.For me its
C:\Users\a610580\AppData\Local\Programs\Python\Python35-32
so I type
C:\Users\a610580\AppData\Local\Programs\Python\Python35-32\Scripts
Click
Ok
to close all windows and restart your command prompt.I repeat - restart your command prompt.
Everything should now be working fine!
Make sure you don’t disturb anything else in the path variable and follow the aforementioned steps exactly.
Alternatively you can watch this video.
根据pip文档,而不是直接运行
pip
,您只需要输入Python终端即可。然后,您将看到您可以做的事情列表。
According to the pip documentation, rather than running
pip
directly, you just need to typein your Python terminal. Then you will see a list of things you can do.
这是因为
pip.exe
不在您的系统路径变量中的路径,因此CMD找不到PIP一个简单的修复程序将是更改为pip.exe ,如果从那里开始运行
,但是更好的解决方案是将其添加到您的路径变量中。打开命令提示符带有管理权和运行
将Python添加到您的路径中,您可以通过运行来检查路径变量中的路径列表,
您应该在那里看到新添加的路径。完成后,不要忘记重新命令提示。
现在您应该能够运行PIP。
That's because the path where
pip.exe
is, is not in your system PATH variable so cmd can't find pip a simple fix will be to change to the directory wherepip.exe
and run if from there like thisBut a better solution is to add it to your PATH variable. Open Command prompt with admin rights and run
that adds python to your PATH, you can check the lists of paths in your path variable by running
You should see your newly added path there. Don't forget to restart command prompt after you're done.
Now you should be able to run pip.
基本上,您需要将PIP安装的路径添加到路径系统变量中。
第一个选项
通过修改Pyton安装来下载PIP。
步骤1-打开应用程序&功能
步骤2-查找python并单击
步骤3-按修改
步骤4-选择
pip
步骤5-选择<代码>将Python添加到环境变量并安装所有
将安装 pip 并同时添加 python 和 pip 。
第二选项
默认情况下, pip 在
c:\ python34 \ scripts \ pip
中安装在您的路径变量遵循该步骤。
步骤1-搜索环境变量并打开编辑系统环境变量
步骤2-开放环境变量...
步骤3-查找您的
path
变量和选择编辑步骤4-将位置粘贴到您的 pip 安装(默认情况下,它是
c:\ python34 \ scripts \ pip
)Basiclly, You need to add the path of your pip installation to your PATH system variable.
First Option
Download pip by modifying the Pyton Installation.
Step 1 - Open Apps & Features
Step 2 - Find Python and click on it
Step 3 - Press Modify
Step 4 - Select
pip
Step 5 - Select
Add Python to environment variables
and install everythingThis will install pip and add both, Python and pip to your envirnoment variables.
Second Option
By default, pip is installed in
C:\Python34\Scripts\pip
To add the path of your pip installation to your PATH variable follow theese steps.
Step 1 - Search for environment variables and open Edit the system environment variables
Step 2 - Open Environment Variables...
Step 3 - Find your
PATH
variable and select EditStep 4 - Paste the location to your pip installation (By default, it's
C:\Python34\Scripts\pip
)安装Python 3.10.4前一段时间后,由于相同的错误消息,我无法使用PIP。似乎在安装Python时出现了问题,或者我忘了将Python添加到Windows路径中。
长话短说:
我卸载了Python选择“卸载”选项,如下所示。
我重新安装 Python 3.10 使用相同的.EXE安装程序。
我确保我选择了“将python添加到路径”。单击“安装Python”后,您可能会在安装窗口的底部找到它。

pip之后的运行良好。
After installing Python 3.10.4 a while ago I was unable to use pip due to the same error message. It seems like that something had gone wrong while installing Python or I had forgotten to add Python to Windows PATH.
Long story short:
I uninstalled python choosing 'Uninstall' option as shown below.
I reinstalled Python 3.10 using the same .exe installer.
I made sure I had selected the option "Add python to PATH". You will probably find it at the bottom of the installation windows after clicking "Install Python".

Pip worked perfectly fine after this.
只需重新安装Python,然后单击安装程序中的添加到路径!
Just reinstall python and click add to PATH in the installer!
我发现使用PowerShell PIP尚未识别,但是在CMD中是。
确保您实际上使用CMD而不是PowerShell来运行它。
I discovered that using powershell PIP wasn't recognized, but in the CMD it is.
Make sure you're actually using the cmd and not powershell to run it.
尝试一下。它对我安装另一个库:
方法1:
方法2:
类型“ cd \”,然后按“ enter”
找到您的Python应用程序路径,该路径是您最初安装Python的文件夹。就我而言,Python应用程序路径是:
c:\ users \ admin \ appdata \ local \ program \ python \ python38
然后键入“ cd”,然后按此路径,然后按Enter:< /p>
您应该获得以下结果
写下python命令,然后按Enter,例如:
Try this. It worked for me installing another library:
Method 1:
Method 2:
Type “cd\” and press "Enter"
Locate your Python application path, which is the folder where you originally installed Python. In my case, the Python application path is:
C:\Users\Admin\AppData\Local\Programs\Python\Python38
Then type "cd" followed by this path and press enter:
You should get the following result
Write your python command now and press enter, for example:
这项工作给我
通过修改Python安装来下载PIP。
步骤1-打开应用程序&amp;功能
步骤2-查找Python并单击它
步骤3-按修改
步骤4-选择PIP
步骤5-选择将Python添加到环境变量中,然后安装所有内容
这将安装PIP并将Python和Pip同时添加到您的环境变量中。
This work for me,
Download pip by modifying the Python Installation.
Step 1 - Open Apps & Features
Step 2 - Find Python and click on it
Step 3 - Press Modify
Step 4 - Select pip
Step 5 - Select Add Python to environment variables and install everything
This will install pip and add both, Python and pip to your environment variables.
然后,删除/卸载,python的旧版本,然后转到新版本的路径 -
c:\ users \ apprandator \ appdata \ local \ program \ program \ python \ python \ python310
(基本上,当您在此安装Python时是默认路径)c:\ users \ indercancer \ appdata \ local \ program \ python \ python310 \ scripts
也添加此路径,然后还可以。
Delete/uninstall, the old version of Python then, go to the path of the new version -
C:\Users\Administrator\AppData\Local\Programs\Python\Python310
(Basically when you install python this is the default path)C:\Users\Administrator\AppData\Local\Programs\Python\Python310\Scripts
add this path too and then ok.
在Windows上:
1-确保安装了Python的位置,您可以通过使用以下内容获取Python的当前路径:
或
输出(例如):
现在转到该路径并访问“脚本”文件夹,并检查是否“ pip.exe”或“ pip3.exe”在那里,如果不尝试使用以下命令来修复它并通过cmd安装:
或
再次检查,如果“ pip.exe”或“ pip3.exe”在那里,如果是,请转到下一步,如果不尝试再次重新安装Python(然后在安装向导中单击PIP复选框)。
2-转到您的“环境变量” ==&gt; “系统变量”,然后单击“路径”
并添加拖车路径(在上面提取时):
3-转到“环境变量” ==&gt; “用于'您的用户名'”的“用户变量”,然后单击“路径”并添加拖车路径(在上面提取时):
4-关闭并重新打开CMD,然后尝试键入“ pip或pip3”
5-如果每件事很好尝试通过以下命令升级PIP版本:
或
完成。
on windows:
1- make sure where is your python are installed , you can get the current path of python by using the following :
or
output (for example):
now go to that path and access the "Scripts" folder , and check if "pip.exe" or "pip3.exe" are there , if not try to use the following command to fix it and install it by cmd:
or
check again , if "pip.exe" or "pip3.exe" are there, if yes go to next step , if not try to reinstall python again (and click on pip checkbox in your Installation Wizard ) .
2- go to your "environment variables" ==> "system variables" and then click on "path"
and add tow paths (as you extract it above) :
3- go to your "environment variables" ==> "user variables for 'your username' " and then click on "path" and add tow paths (as you extract it above) :
4- close and reopen your CMD again and try to type "pip or pip3"
5- if every thing fine try to upgrade your pip version by the following command:
or
done.
如果第一个解决方案不起作用,请注意您的路径,没有一个机会而不是写作:
c:\ users \\ appdata \ local \ program \ python \ python \ python38-32
您写
c:/user/a610580/appdata/local/program/python/python/python38-32
如果您无法执行
pip pip pip install selplast selenium
在Visual Studio上靠近并打开视觉工作室。In case the first solution didn't work, give attention to your path, there is a slight chance instead of writing :
C:\Users\\AppData\Local\Programs\Python\Python38-32
you wrote
C:/Users/a610580/AppData/Local/Programs/Python/Python38-32
if you couldn't execute
pip install selenium
on visual studio write it on cmd first the close and open your visual studio.如果您已经正确设置了路径并仍会遇到相同的错误,请按照以下操作:
if you have already set the path correctly and still getting the same error then just follow this:
只需转到python root文件夹,例如\ python38-32,然后进入\ scripts subfolder,其中包含pip.exe。您可以从那里完美安装。但是,为了避免再递归通过许多文件,您应该按照上述答案重置路径变量。
simply go to python root folder like \python38-32 and then go into \Scripts subfolder where contains pip.exe. You can install flawlessly from there. However, to avoid another time recursively go through many files, you should reset the PATH variable as the above answer mentioned.