'pip' 无法识别 [英] 'pip' is not recognized

查看:180
本文介绍了'pip' 无法识别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试安装 PySide 但我从 Power Shell 中得到如下错误:

I tried to install PySide but I got error from the power shell as follows:

pip :术语pip"不被识别为 cmdlet 的名称,函数、脚本文件或可运行的程序.检查拼写名称,或者如果包含路径,请验证路径是否正确并且再试一次.在行:1 字符:1
+ pip install -U PySide
+ ~~~
+ CategoryInfo : ObjectNotFound: (pip:String) [], CommandNotFoundException
+ FullQualifiedErrorId : CommandNotFoundException

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

推荐答案

当尝试在命令提示符中使用 pip 时,Windows 上会出现此错误.要在 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:

步骤 1 - 右键单击​​我的电脑"或这台电脑"
第 2 步 - 单击属性"
第 3 步 - 点击高级系统设置

Step 1 - Right click on My Computer or This PC
Step 2 - Click on Properties
Step 3 - Click on Advanced System Settings

您将找到一个名为系统变量的部分.
从显示在那里的变量和值列表中单击路径.
点击路径后点击编辑.您会在弹出窗口中找到一个新建按钮.
单击它并粘贴 python35 或 python36 文件夹的位置(您在安装 python 时指定的位置),然后是Scripts".
对我来说是C:Usersa610580AppDataLocalProgramsPythonPython35-32"
所以我输入C:Usersa610580AppDataLocalProgramsPythonPython35-32Scripts"
单击确定关闭所有窗口并重新启动命令提示符.
我再说一遍 - 重新启动您的命令提示符.

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 click edit. You will find a New button in the pop up.
Click that and paste the location of the python35 or python36 folder (The location you specified while installing python) followed by "Scripts" there.
For me its "C:Usersa610580AppDataLocalProgramsPythonPython35-32"
so I type "C:Usersa610580AppDataLocalProgramsPythonPython35-32Scripts"
Click Ok to close all windows and restart your command prompt.
I repeat - restart your command prompt.

现在一切正常!确保您不会干扰路径变量中的任何其他内容,并完全按照上述步骤操作.或者,您可以观看此视频 - https://www.youtube.com/watch?v=Jw_MuM2BOuI快乐编码!

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 - https://www.youtube.com/watch?v=Jw_MuM2BOuI Happy coding!

这篇关于'pip' 无法识别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆