简体   繁体   English

升级pip后安装后pip更新错误我每次使用pip时都无法使用它显示相同的错误并且sudo也不能用于安装

[英]pip update error after install after upgrading pip i cannot use it every time i use pip is shows same error and sudo cannot be used either to install

today I install a module with pip for python in the terminal it says warning new version of pip is available u can install it by using pip --upgrade And it successfully installed but after that whenever I try to install any module it says 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.今天我在终端中安装了一个带有 pip for python 的模块,它说警告新版本的 pip 可用,你可以使用pip --upgrade安装它并且它成功安装,但是之后每当我尝试安装任何模块时,它都会显示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. 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.

and i searched here and there and people say that use sudo python -m pip --uninstall pip && sudo apt python -install pip --reinstall我到处搜索,人们说使用sudo python -m pip --uninstall pip && sudo apt python -install pip --reinstall

where it says the same thing but this time its它说同样的话,但这次是

'sudo' : The term 'sudo' 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.包括,验证路径是否正确,然后重试。

It looks like you need to add Python and PIP to your path ( Instructions ).看起来您需要将 Python 和 PIP 添加到您的路径( 说明)。

Also as John Gordon pointed out, sudo is a Unix/Linux command and you appear to be using Windows.同样正如约翰戈登指出的那样,sudo 是一个 Unix/Linux 命令,您似乎正在使用 Windows。

Python-sudo is a Modular to execute any subprocess commands as another user. Python-sudo 是一个以其他用户身份执行任何子进程命令的模块。

We can install it by using pip install sudo我们可以使用 pip install sudo 安装它

We know that sudo is a Linux command but we can use it in python.我们知道 sudo 是一个 Linux 命令,但我们可以在 python 中使用它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM