繁体   English   中英

这是否意味着pip安装的python路径不正确? 如果是这样,我如何知道正确的路径,然后如何更改?

[英]Does this means the python path for pip install is incorrect? If so, how do I know the right path and then how do I change that?

我正在尝试点安装Jupyter,但powershell给我这个错误:

C:\Users\me> pip install jupyter
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 jupyter
+ ~~~
    + CategoryInfo          : ObjectNotFound: (pip:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

我曾尝试阅读有关固定路径的其他问题,但是即使重新启动Powershell和我的系统后,这些解决方案也无法正常工作。 另外,我执行了系统更新并重新安装了python。 这些都不起作用。

我发现,如果python不在您的路径上,则pip无效。 运行以下命令以查看路径上的内容。

PS> ($env:PATH).split(';')

如果您在路径上看不到python,请像下面一样添加它(假设您的python安装位于c:\\名为python的目录中。

PS> $env:PATH = "$($env:PATH);C:\\python"

尝试在与前两个​​命令相同的PowerShell控制台中运行pip。 如果可行,则需要将c:\\python永久添加到PATH中。

暂无
暂无

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

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