Reinstall Easy_install (Setuptools)
1, to download Https://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11-py2.7.egg
2, to the terminal to perform sudo sh setuptools-0.6c11-py2.7.egg
3, clear the download Setuptools-0.6c11-py2.7.egg
Remove MySQL
sudo rm/usr/local/mysql
sudo rm-rf/usr/local/mysql*
sudo rm-rf/library/startupitems/mysqlcom
sudo rm-rf/library/preferencepanes/mysql*
Vim/etc/hostconfig and removed the line mysqlcom=-yes-
RM-RF ~/library/preferencepanes/mysql*
sudo rm-rf/library/receipts/mysql*
sudo rm-rf/library/receipts/mysql*
sudo rm-rf/var/db/receipts/com.mysql.*
Mac to remove your own installed Python
Remove the Python framework
sudo rm-rf/library/frameworks/python.framework/versions/x.x
Remove a Python program
sudo rm-rf "/applications/python x.x"
Remove the Python connection in the/usr/local/bin directory
X.X is the version number of Python
Installing the PHP development environment
Mamp all have it.
Installing the Python development environment
Affected Mamp, be mysqldb toss for a long time. Finally, remove Python and start over.
Install Python
Install Wxpython
Install Easy_install
Install mysql-5.1.73-osx10.6-x86_64 (64-bit MySQL, just to install the mysqldb below)
Edit. Bash_profile:
# Setting PATH for MySQLdb
Path= "/usr/local/mysql-5.1.73-osx10.6-x86_64/bin:${path}"
Export PATH
Export dyld_library_path= "/usr/local/mysql-5.1.73-osx10.6-x86_64/lib"
Export Versioner_python_prefer_64_bit=no
Export Versioner_python_prefer_32_bit=yes
Install Mysql-python (sudo easy_install mysql-python)