mac下用port安装python和opencv

macport是mac下类似ubuntu里的apt的包管理器。


以下以安装python和opencv为例列举一些port的常用命令


sudo port -fp uninstall installed
卸载之前用port安装的软件

sudo port selfupdate

更新port

sudo port upgrade outdated

更新软件包

sudo port install python27 py27-numpy py27-scipy py27-matplotlib py27-ipython

安装python2.7和相应的包

sudo port install opencv +python27

安装opencv并依赖python2.7

sudo easy_install-2.7 bpython
附带安装bpython,一个很方便的python解释器


ps:卸载之前安装的activepython
#uninstall activepython
sudo /Library/Frameworks/Python.framework/Versions/2.7/Resources/Scripts/uninstall



你可能感兴趣的:(mac下用port安装python和opencv)