PyCAM on Mac OS X

sandro
Posts: 48
Joined: Tue Apr 10, 2012 12:15 am

PyCAM on Mac OS X

Post by sandro » Sat Apr 28, 2012 10:06 am

Since people had some trouble running PyCAM on the Mac, I thought I'd post what worked for me.
Someone created a really helpful blog post. Here are all the steps I used to install on a completely vanilla Mac OS X Mountain Lion (10.8) system.

1. Install Xcode from the App Store.
Start Xcode, and install "Command Line Tools". (In the Xcode menu select Preferences...->Downloads->Components->Command Line Tools->install button).

2. Download and Install XQuartz.

3. Download PyCAM, and then double-click the archive to uncompress it.

4. Run /Applications/Utilities/Terminal.app

5. Each step below assumes you're typing (or copy/pasting) each CODE block into the Terminal window, and that PyCAM was uncompressed into your Downloads directory.
  • Install Homebrew

    Code: Select all

    ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"
  • Run Homebrew self-check

    Code: Select all

    brew doctor
  • Compile & Install PyGTK

    Code: Select all

    /usr/local/bin/brew install pygtk
  • Compile & Install PyOpenGL (requires password)

    Code: Select all

    sudo easy_install PyOpenGL
  • Compile & Install PyGTKGLExt

    Code: Select all

    /usr/local/bin/brew install pygtkglext
  • Patch PyCAM

    Code: Select all

    curl -L "http://goo.gl/U8hJ1" | patch -p0
  • Configure user environment

    Code: Select all

    echo "export 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.
Last edited by sandro on Fri Nov 02, 2012 5:35 pm, edited 8 times in total.

edwardrford
Posts: 1250
Joined: Mon Apr 09, 2012 5:40 pm
Location: Dixon, IL
Contact:

Re: PyCAM on Mac OS X

Post by edwardrford » Sat Apr 28, 2012 8:51 pm

Hey, that's awesome info! Thanks for taking the time to document it.

Would anyone be up for adding that to the wiki?

-Edward
Shapeoko 1 #0 - a couple of upgrades.
Shapeoko 2 #0 - a couple of upgrades.
Shapeoko 3 #2 - Stock

sandro
Posts: 48
Joined: Tue Apr 10, 2012 12:15 am

Re: PyCAM on Mac OS X

Post by sandro » Sun Apr 29, 2012 5:44 am

If someone can confirm that these instructions work, I'll happily add it to the Wiki.

calica
Posts: 107
Joined: Wed Apr 11, 2012 8:13 am

Re: PyCAM on Mac OS X

Post by calica » Sun Apr 29, 2012 6:38 am

You also need to install command line tools for Xcode. Running "brew doctor" will give you more info.

Great info BTW! Thanks. I've been putting off installing pyCAM because I don't really like MacPorts. Doing this on with homebrew is much nicer.

calica
Posts: 107
Joined: Wed Apr 11, 2012 8:13 am

Re: PyCAM on Mac OS X

Post by calica » Sun Apr 29, 2012 10:38 pm

sandro wrote:If someone can confirm that these instructions work, I'll happily add it to the Wiki.
They work. I did the last two steps by hand but they should be fine.

sandro
Posts: 48
Joined: Tue Apr 10, 2012 12:15 am

Re: PyCAM on Mac OS X

Post by sandro » Mon Apr 30, 2012 2:00 pm

Added to the Wiki.

DanMc
Posts: 257
Joined: Fri Apr 13, 2012 3:34 am

Re: PyCAM on Mac OS X

Post by DanMc » Mon Aug 13, 2012 1:16 am

I just ran through the whole procedure and when I try to run I get

-bash: ./pycam: No such file or directory

I know absolutely nothing about using the terminal, so my searching through the pycam forum was a bit futile. Anybody able to point me in the right direction, do I need to start over?

calica
Posts: 107
Joined: Wed Apr 11, 2012 8:13 am

Re: PyCAM on Mac OS X

Post by calica » Sun Aug 19, 2012 5:47 am

Which directory did you extract pycam into?

When you first start terminal, your working directory is /Users/username (username is replace with your username). You need to change your working directory to where you extracted pycam. To do that, use the "cd directory_to_pycam".

DanMc
Posts: 257
Joined: Fri Apr 13, 2012 3:34 am

Re: PyCAM on Mac OS X

Post by DanMc » Tue Aug 21, 2012 1:24 am

That's precisely what I did, I extracted it into my home directory.

I'll try extracting it again into the pycam directory. I did see that I was supposed to do that but I wasn't sure how to change it, even after a quick search of the interwebs I couldn't figure it out.

So thanks for the tip! I'll post my results.

oldrayj
Posts: 93
Joined: Wed Sep 26, 2012 8:00 pm
Location: Bellbrook, Ohio
Contact:

Re: PyCAM on Mac OS X

Post by oldrayj » Wed Sep 26, 2012 8:13 pm

I have the same problem. I have confirmed home brew is ok with brew doctor. Need help on where how to get pycam started. I have unzipped it both in downloads and my desktop. Like above, I get "-bash: ./pycam: No such file or directory" when I enter ./pycam at the terminal. The cd script didn't work either. I want to get the software working before ordering a machine. Thanks.

Post Reply