【问题标题】: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?这是否意味着 pip install 的 python 路径不正确?如果是这样,我怎么知道正确的路径,然后我该如何改变呢?
【发布时间】:2020-01-04 03:46:43
【问题描述】:

我正在尝试 pip install 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。这些都不起作用。

【问题讨论】:

  • 你安装pip成功了吗?您是否将 pip 添加到 PATH 环境变量中?也许你可以尝试使用pip3...

标签: python powershell path pip installation


【解决方案1】:

我发现如果 python 不在你的路径上,那么 pip 就不起作用。运行以下命令以查看路径上的内容。

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

如果您在路径上没有看到 python,则像我在下面那样添加它(假设您的 python 安装在 c:\ 中名为 python 的目录中。

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

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

【讨论】:

    猜你喜欢
    • 2020-03-19
    • 2016-12-14
    • 2020-11-16
    • 1970-01-01
    • 2020-09-26
    • 2015-01-22
    • 1970-01-01
    • 1970-01-01
    • 2015-01-10
    相关资源
    最近更新 更多