【问题标题】:Why do i get this error when i use the pip install command [duplicate]为什么我在使用 pip install 命令时会收到此错误 [重复]
【发布时间】:2020-05-01 23:58:55
【问题描述】:

当我尝试使用 pip(python) 安装软件包时,我遇到了一个问题。我认为它与路径有关,因为我对它做了一些事情。 这是错误

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
+ ~~~
+ CategoryInfo          : ObjectNotFound: (pip:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

【问题讨论】:

标签: python pip


【解决方案1】:

可执行文件“pip”不在您的系统路径中。您可以使用echo %PATH% 检查您的路径变量并验证正在搜索哪些可执行文件。如果您提供有关您的 python 安装的更多详细信息(安装的 python 版本、安装方式和位置),有人会帮助您安装“pip”或将其添加到路径中。

【讨论】:

    【解决方案2】:

    这意味着您没有安装 pip,这很奇怪,因为它预装了 python。无论如何,你可以通过下载来获得它 'https://bootstrap.pypa.io/get-pip.py' 然后导航到您刚刚下载的 pip 文件夹并运行命令 'python get-pip.py' 您现在可以使用以下方法验证您是否正确安装了它 '点子-V'

    【讨论】:

      【解决方案3】:

      通过在具有管理员权限的 CMD 中运行此命令将 pip 添加到您的路径(将路径“C:\Python36\Scripts”替换为您自己的 python 安装路径)-

      setx path "C:\Python36\Scripts;"
      

      重新启动您的 CMD 并再次尝试 pip。

      【讨论】:

        猜你喜欢
        • 2020-11-08
        • 1970-01-01
        • 2021-04-28
        • 1970-01-01
        • 2018-06-22
        • 2016-01-01
        • 1970-01-01
        相关资源
        最近更新 更多