-
Notifications
You must be signed in to change notification settings - Fork 10
Osx environment setup
Paul edited this page May 26, 2013
·
48 revisions
Tested with:
- OSX 10.6.8
Note: It is probably a good idea to run Apple Software Update to ensure you have the latest version of your respective OSX
Please Note: Installing Xcode from the DVD will probably not give you the latest version of Xcode relative to your osx version. If you want to be sure that you have the latest version, please download Xcode (see below).
- On the OSX install DVD, open the folder "Optional Installs"
- Double click "Xcode.mpkg"
- When installing Xcode, you may skip iOS SDK by expanding "Essentials" and unchecking it. It is huge, and is not needed for our purposes.
- Go to Apple Developer website
- Click on "Resources" at the top of the page
- Under "OS X", click "Downloads"
- Sign in using your Apple ID
- On the LEFT side of the screen, there is a search box. Type in the appropriate version of Xcode depending on your version of OSX:
- OpenCV requires at least Xcode 3.2, and this is not readily available for 10.5 (Leopard) and older
- For OSX 10.6 (Snow Leopard), type
xcode 3.2
- For OSX 10.7 (Lion), type
xcode 4
- Now, click on the highest version of Xcode depending on your search in the previous step, and download the dmg file
- When installing Xcode, you may skip iOS SDK by expanding "Essentials" and unchecking it. It is huge, and is not needed for our purposes.
Note: Even if you already have a version of python on your system, you should follow these installation instructions so that the dependencies are satisfied. You don't have to worry about uninstalling any other versions of python first.
- Download and install MacPorts
- Open terminal, type:
sudo port selfupdate
sudo port install python27
touch ~/.bash_profile
sudo open -e .bash_profile
- Add this line at the TOP, then save:
export PATH="/opt/local/bin:$PATH"
- Close terminal and reopen. Type:
sudo port select --set python python27
sudo port install py27-numpy
sudo port install opencv +python27
- Wait for opencv to build, as it will take a while (possibly hours but probably less).
-
sudo port install py27-tkinter
, for IDLE to work. sudo port install py27-pil
- Now go to Finder > Applications > MacPorts > Python 2.7 > IDLE
- Test your environment by typing
import cv2
on the IDLE command line. There should not be any errors. If there is an error, see Useful Links at the bottom of this page. - This is the version of IDLE you will be using for DVS, regardless of other versions of python on your system.
- Test your environment by typing
- Download and install Git. Just doubleclick on the package and that's it!
- After installing Git, restart the terminal before using the
git
command - Git runs straight through terminal using the
git
command
- http://samkhan13.wordpress.com/2012/06/18/using-opencv-with-python-on-your-mac-os-x/
- http://stackoverflow.com/questions/9305154/python-will-not-recognize-macports-installed-packages
- http://stackoverflow.com/questions/8410443/how-to-install-python-2-7-bindings-for-opencv-using-macports
- http://thepetitegeek.blogspot.com/2009/09/installing-opencv-on-mac-os-x-with.html