win10下pip升级报错的解决办法

转自:https://blog.csdn.net/csdn_elsa/article/details/79809003

win10下pip升级报错的解决办法

2018年04月03日 21:15:30 csdn_elsa 阅读数:273

 

安装tensorflow --gpu版时,提示我的pip有新版本9.0.3,打算直接更新。

 

 

1.根据提示, 在cmd下运行

python -m pip install --upgrade pip

    时,提示:

Installing collected packages: pip   Found existing installation: pip 9.0.1     Uninstalling pip-9.0.1:...

卸载pip-9.0.1失败。

→然后通过管理员权限打开cmd再次运行

python -m pip install --upgrade pip

2.提示

D:\python\python.exe: No module named pip

还是不行

→接着键入

 

 

D:\python362>python -m ensurepip

提示:

Requirement already satisfied: setuptools in d:\python362\lib\site-packages
Collecting pip
Installing collected packages: pip
Successfully installed pip-9.0.1

 

 

键入

D:\python>easy_install pip

提示:

 

Searching for pipBest match: pip 9.0.1Adding pip 9.0.1 to easy-install.pth fileInstalling pip-script.py script to d:\python\ScriptsInstalling pip.exe script to d:\python\ScriptsInstalling pip3-script.py script to d:\python\ScriptsInstalling pip3.exe script to d:\python\ScriptsInstalling pip3.5-script.py script to d:\python\ScriptsInstalling pip3.5.exe script to d:\python\Scripts

 

Using d:\python\lib\site-packagesProcessing dependencies for pipFinished processing dependencies for pip

3.这时再输入命令

python -m pip install --upgrade pip

 

最后成功安装pip-9.0.3

 

Collecting pip
  Using cached pip-9.0.3-py2.py3-none-any.whl
Installing collected packages: pip
  Found existing installation: pip 9.0.1
    Uninstalling pip-9.0.1:
      Successfully uninstalled pip-9.0.1
Successfully installed pip-9.0.3

 

以上借鉴网上众多方法,经过尝试,最终成功安装,特此总结。当然期间还出现过找不到‘python’命令符的提示,通过添加PATH的方法解决了。

 

 

第一次写博客,作为自己平时学习的小总结,也希望能帮助到遇到同样问题的人。小白一只,在写博客总结时,语言和方法可能都有或多或少的问题,希望各位批评指正,不吝赐教。我也会努力哒!

你可能感兴趣的:(python,pip)