码迷,mamicode.com
首页 > 编程语言 > 详细

解决python升级导致pip无法使用

时间:2019-10-20 11:05:16      阅读:105      评论:0      收藏:0      [点我收藏+]

标签:使用   升级   *args   res   nbsp   sources   bsp   code   line   

File "/usr/local/python3/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3003, in _call_aside
f(*args, **kwargs)
File "/usr/local/python3/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3030, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/local/python3/lib/python3.6/site-packages/pkg_resources/__init__.py", line 661, in _build_master
return cls._build_from_requirements(__requires__)
File "/usr/local/python3/lib/python3.6/site-packages/pkg_resources/__init__.py", line 674, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/usr/local/python3/lib/python3.6/site-packages/pkg_resources/__init__.py", line 853, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The ‘pip==7.1.0‘ distribution was not found and is required by the application

 

先查看以下目录/usr/local/python最新版本/lib/python最新版本/site-packages查看对应的pip版本,然后修改pip,代码如下:

vi /usr/local/bin/pip

将pip==7.1.0修改成pip==对应版本,就可以了

解决python升级导致pip无法使用

标签:使用   升级   *args   res   nbsp   sources   bsp   code   line   

原文地址:https://www.cnblogs.com/love-vce/p/11706725.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!