解决Python中出现的问题: “You are using pip version 9.0.1, however version 19.2.3 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command.”

1. 一开始我在使用Pycharm时,导入numpy库,发现导入错误:

Non-zero exit code (1)

2. 于是我通过更新的方法来解决,哪知道在更新的时候也出现了错误,错误如下图:

解决Python中出现的问题: “You are using pip version 9.0.1, however version 19.2.3 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command.”_第1张图片

 这个错误是在告诉我,我的版本低,需要升级更高的版本才能使用命令python -m pip install --upgrade pip

3. 输入:

conda install pip

解决Python中出现的问题: “You are using pip version 9.0.1, however version 19.2.3 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command.”_第2张图片

命令提示我又出现了错误,内容是You don't appear to have the necessary permissions to install packages,也就是说我没有权限可以安装软件包等。。。我很难受。。。

4. 好了,现在需要先将权限赋予了才能执行下一步操作,按照提示给的命令输入:

conda create -n my_root --clone="C:\ProgramData\Anaconda3"

解决Python中出现的问题: “You are using pip version 9.0.1, however version 19.2.3 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command.”_第3张图片

 输入之后你会发现,需要激活my_root

activate my_root

5. 激活之后,就能输入我们一开始输进去报错的命令

conda install pip

一次升级可能还没有到我们能够正常更新的版本,因此命令执行完毕之后,要多执行几次,如果提示 All requested packages already installed.,无需再次更新,那么就ok了。

 解决Python中出现的问题: “You are using pip version 9.0.1, however version 19.2.3 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command.”_第4张图片

6. 另外,据网上资料所说,官网上有解决的方法,只需要输入:python -m pip install -U pip,我还没尝试过,上面的方法亲测有效。

下面截图是我已经解决了报错之后输入的官方给的命令,其实提示一样,已经更新了, 9.0.1-py36hadba87b_3 --> 19.2.3-py36_0

你可能感兴趣的:(解决Python中出现的问题: “You are using pip version 9.0.1, however version 19.2.3 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command.”)