使用PyCharm全新安装Ubuntu 13.10,当设置
python解释器时,我选择了“安装setuptools”,然后“安装pip”.现在如果我尝试和任何东西与点我得到以下:
ciaran@ciaran-desktop:~/pycharm/bin$pip Traceback (most recent call last): File "/usr/local/bin/pip",line 9,in <module> load_entry_point('pip==1.4.1','console_scripts','pip')() File "build/bdist.linux-x86_64/egg/pkg_resources.py",line 357,in load_entry_point """Does the package's distribution contain the named Metadata?""" File "build/bdist.linux-x86_64/egg/pkg_resources.py",line 2394,in load_entry_point File "build/bdist.linux-x86_64/egg/pkg_resources.py",line 2108,in load ImportError: No module named pip
我试过python 2.7.5和3.3.2,并且都产生相同的结果.
Error: Python package management tool 'pip' not found
解决方法
我发现在Ubuntu上,pip并不总是为其安装的模块设置读取和执行权限.我的解决方案是始终运行这个shell脚本:
sudo chmod -R a+rX /usr/lib/python*/dist-packages/ sudo chmod -R a+rX /usr/local/lib/python*/dist-packages/ sudo chmod a+rX /usr/bin/* sudo chmod a+rX /usr/local/bin/*