我在运行 pip 尝试安装 rpyc 时遇到了下面的问题。即使我尝试在没有任何参数的情况下运行 pip,它仍然会输出相同的错误。任何帮助都将不胜感激,谢谢。
volt72@killadelph:~/zone/zone$ pip
Traceback (most recent call last):
File "/usr/bin/pip", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/local/lib/python2.7/dist-packages/distribute-0.6.14-py2.7.egg/pkg_resources.py", line 2691, in <module>
add_activation_listener(lambda dist: dist.activate())
File "/usr/local/lib/python2.7/dist-packages/distribute-0.6.14-py2.7.egg/pkg_resources.py", line 668, in subscribe
callback(dist)
File "/usr/local/lib/python2.7/dist-packages/distribute-0.6.14-py2.7.egg/pkg_resources.py", line 2691, in <lambda>
add_activation_listener(lambda dist: dist.activate())
File "/usr/local/lib/python2.7/dist-packages/distribute-0.6.14-py2.7.egg/pkg_resources.py", line 2192, in activate
self.insert_on(path)
File "/usr/local/lib/python2.7/dist-packages/distribute-0.6.14-py2.7.egg/pkg_resources.py", line 2293, in insert_on
"with distribute. Found one at %s" % str(self.location))
ValueError: A 0.7-series setuptools cannot be installed with distribute. Found one at /usr/local/lib/python2.7/dist-packages/setuptools-20.7.0-py2.7.egg
volt72@killadelph:~/zone/zone$
答案1
好的,经过一些研究后,我决定执行以下操作:
rm /usr/local/lib/python2.7/dist-packages/setuptools-20.7.0-py2.7.egg
sudo apt-get purge python-pip
wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py
现在 pip 可以正常运行。
答案2
我通过删除分发解决了它
sudo pip uninstall distribute