重新安裝easy_install(setuptools)
1,去下載 https://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11-py2.7.egg
2,到終端執行 sudo sh setuptools-0.6c11-py2.7.egg
3,清除下載的setuptools-0.6c11-py2.7.egg
刪除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下刪除自己安裝的Python
刪除Python框架
sudo rm -rf /Library/Frameworks/Python.framework/Versions/x.x
刪除Python程序
sudo rm -rf “/Applications/Python x.x”
刪除/usr/local/bin目錄下的Python連接
x.x為Python的版本號
安裝PHP開發環境
MAMP 都有了
安裝Python開發環境
受累MAMP,被MySQLdb折騰好久。最後,刪除了python重新來過。
安裝python
安裝wxpython
安裝easy_install
安裝mysql-5.1.73-osx10.6-x86_64(64位的mysql,就是為了安裝下面的MySQLdb)
編輯.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
安裝MySQL-python(sudo easy_install MySQL-python)