Mysql-python is a third-party module library for Python to access the MySQL database;
The following error occurred during the installation process:
[[email protected] mysql-python-1.2.5]# python setup.py install
Traceback (most recent):
File "setup.py", line 7, <module>
Import Setuptools
Importerror:no module named Setuptools
It literally means: There is no setuptools module, which means Python lacks this module;
Here's how to fix it:
Download Setuptools Package
# wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz
Unzip the Setuptools bag
# TAR-XVF Setuptools-0.6c11.tar.gz
# CD SETUPTOOLS-0.6C11
Compiling Setuptools
# python setup.py Build
Start performing setuptools Installation
# python setup.py Install
Installation completed;
# ls-l/usr/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg
-rw-r--r--. 1 root root 333591 Mar 14:21/usr/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg
Perform the above operation again without error;
This article is from the "Model Student's Learning blog" blog, please be sure to keep this source http://mofansheng.blog.51cto.com/8792265/1911395
Python error: No module named Setuptools workaround