在Ubuntu下的PyCharm安装python工具时提示:
Traceback (most recent call last):
File "/tmp/tmp1TAADfpycharm-management/pip-9.0.1/setup.py", line 6, in <module>
from setuptools import setup, find_packages
ImportError: No module named setuptools
解决办法:
(1)下载setuptools包:
sudo wget https://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz
(2)解压setuptools包
tar -xvf setuptools-0.6c11.tar.gz
(3)进入解压目录
cd setuptools-0.6c11
(4)编译setuptools
sudo python setup.py build
(5)最后执行setuptools安装
sudo python setup.py install
(6)安装成功后,最下面会出现类似于如下标志:
Installed /usr/local/lib/python2.7/dist-packages/setuptools-0.6c11-py2.7.egg
Processing dependencies for setuptools==0.6c11
Finished processing dependencies for setuptools==0.6c11
下载并安装完setuptools后,可以正常安装python工具