Installation of Mysql-python database in Mac system

Source: Internet
Author: User
Tags php development environment

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.