安装macport
从此处下载镜像http://www.macports.org/
[size=1em]之后设置环境变量
vi .bash_profile
增加macport的安装路径 /opt/local/bin:/opt/local/sbin
完整的如下
# Setting PATH for MacPython 2.5
# The orginal version is saved in .bash_profile.pysave
PATH="/opt/local/bin:/opt/local/sbin:/Library/Frameworks/Python.framework/Versions/Current/bin:${PATH}"
export PATH
~
之后关闭Terminal,并重新打开Terminal
sudo port selfupdate
you can run port installed to see the packages and the versions that are installed.