1, installation MacPorts
Visit the official website http://www.macports.org/install.php, here is provided with DMG installation and source installation two ways, here to download the corresponding Mac version of the MacPorts to install.
After you click Install, type
port -v
If the content is displayed, the installation succeeds
Also type the following command at the terminal
cat .bash_profile
The installed software will be automatically configured in the environment variables, such as
At this point, the installation succeeds.
2. Use and Common commands
更新ports tree和MacPorts版本,强烈推荐第一次运行的时候使用-v参数,显示详细的更新过程。sudo port -v selfupdate搜索索引中的软件port search name安装新软件sudo port install name卸载软件sudo port uninstall name查看有更新的软件以及版本port outdated升级可以更新的软件sudo port upgrade outdatedEclipse的插件需要subclipse需要JavaHL,下面通过MacPorts来安装sudo port install subversion-javahlbindings
3. Install Python and libraries
sudo port install python27 py27-numpy py27-scipy py27-matplotlib py27-ipython安装python2.7和相应的包sudo port install opencv +python27安装opencv并依赖python2.7sudo prot install py27-pil安装依赖于python2.7的pil库
When the above contents are installed, you can see the effect of the installation by typing python2.7 in the terminal.
4. Reference links
Python installation
Http://www.cangfengzhe.com/python/3207.html
Getting Started with Python:
Http://www.jb51.net/article/926.htm
MacPorts Installation and use
Http://www.ccvita.com/434.html
Install Python and OpenCV with Port under Mac
http://blog.csdn.net/heavywater/article/details/8247024
Find the existing port installation package
https://www.macports.org/ports.php
Python style specification
http://blog.csdn.net/liuxincumt/article/details/7919518
Python like stitching
Https://github.com/cbuntain/stitcher
Http://dawinproject.blogspot.jp/2014/01/multiple-images-panorama-stitching-with.html
Install the Python environment and the corresponding libraries using MacPorts