请帮助我。
- 服务器:AWS EC2
- 操作系统:Amazon Linux
- Python 版本:2.7.10
$ pip --version pip 7.1.2(Python 2.7)来自 /usr/local/lib/python2.7/site-packages
这没问题。
但是...
$ sudo pip --version Traceback (most recent call last): File "/usr/bin/pip", line 5, in from pkg_resources import load_entry_point File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3020, in working_set = WorkingSet._build_master() File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 616, in _build_master return cls._build_from_requirements(__requires__) File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 629, in _build_from_requirements dists = ws.resolve(reqs, Environment()) File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 807, in resolve raise DistributionNotFound(req) pkg_resources.DistributionNotFound: pip==6.1.1
sudo vim /usr/bin/pip-2.7
或者pip-3.5
。 - herve