1、在安装过程中出现如下错误:
ImportError: No module named setuptools
[root@localhost MySQL-python-1.2.5]# python setup.py install
Traceback (most recent call last):
File "setup.py", line 7, in <module>
import setuptools
ImportError: No module named setuptools
字面意思是:没有setuptools的模块,说明python缺少这个模块;
Python错误:No module named setuptools 解决方法 在安装过程中出现如下错误: [root@localhost MySQL-python-1.2.5]# python setup.py install Traceback (most recent call last): File "setup.py", line 7, in <module> import setuptools ImportError: No module named setuptools 字面意思是:没有setuptools的模块,说明python缺少这个模块; 解决方法如下: 下载setuptools包 # wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz 解压setuptools包 # tar -xvf setuptools-0.6c11.tar.gz # cd setuptools-0.6c11 编译setuptools # python setup.py build 开始执行setuptools安装 # python setup.py install 安装完成;
2、安装pip
pip下载地址 https://pypi.python.org/pypi/pip 安装pip [root@localhost mnt]# tar -xvzf pip-7.1.0.tar.gz [root@localhost mnt]# cd pip-7.1.0 [root@localhost pip-7.1.0]# ls AUTHORS.txt docs MANIFEST.in pip.egg-info README.rst setup.py CHANGES.txt LICENSE.txt pip PKG-INFO setup.cfg [root@localhost pip-7.1.0]# python setup.py install