These instructions are partly based on a really helpful blog post.
These are all the steps I used to install on a completely vanilla Mac OS X Lion (10.7) system.
- Mac sure Xcode is installed along with the "command line tools". Xcode is free from the App Store, and the command line tools are installable from inside Xcode (AppleID required).
- Download PyCAM, and then double-click the archive to uncompress it into your Downloads directory..
- Run /Applications/Utilities/Terminal.app
- Continue with the steps below typing (or copy/pasting) each indented line into the Terminal window:
- Install Homebrew
/usr/bin/ruby -e "$(/usr/bin/curl -fksSL https://raw.github.com/Homebrew/homebrew/go/install)"
- Compile & Install PyGTK
/usr/local/bin/brew install pygtk
- Compile & Install PyOpenGL (requires password)
sudo easy_install PyOpenGL
- Compile & Install PyGTKGLExt
/usr/local/bin/brew install pygtkglext
- Patch PyCAM
curl http://sandro.knot.org/pub/pycam.patch | patch -p0This command must be run from your HOME directory, not the directory where pyCam is unzipped.
- Configure user environment
echo "\nexport PYTHONPATH=/usr/local/lib/python2.7/site-packages" >> ~/.bashrc
Now you should be able to just run ./pycam from inside it's directory.
It's important to note that these instructions assume that your system is pretty much as Apple installed it. These instructions might change if you've changed the default Terminal shell or have/had MacPorts or Fink installed. So please exercise caution, and ask questions if this doesn't appear to work.
I should also point out that there are ways to make the path planning run faster, but they are beyond the scope of these instructions. Check out the blog post I mentioned earlier for more information about this.