Install the Python environment and the corresponding libraries using MacPorts

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.