MacOS安装Python环境

原文地址为: MacOS安装Python环境

1.mac自带Python2.7


2.安装pip
easy_install pip


3.安装MySQLdb
sudo pip install MySQL-python
(MySql重新安装后,import MySQLdb 可能报错"Reason: image not found",此时sudo pip uninstall ... 然后重新安装即可 )


4.安装pycurl
sudo pip install pycurl -i https://pypi.tuna.tsinghua.edu.cn/simple --user

不带--user会报错: error: could not create '/System/Library/Frameworks/Python.framework/Versions/2.7/share': Operation not permitted


【MacOS安装Python环境】待续。。

转载请注明本文地址: MacOS安装Python环境

    推荐阅读