PyCAM on Mac OS X

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

Re: PyCAM on Mac OS X

Post by sandro » Fri Nov 09, 2012 3:04 pm

The patch installing is a good sign. Assuming you ran the environment change, run the following commands for me:

Code: Select all

bash
set | grep -i python
cd ~/Downloads/pycam-0.5.1
pycam

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

Re: PyCAM on Mac OS X

Post by oldrayj » Fri Nov 09, 2012 3:26 pm

Ran it and got:

bash: nexport: command not found
bash: nexport: command not found
bash: nexport: command not found
bash-3.2$ set | grep -i python
PYTHONPATH=/usr/local/lib/python2.7/site-packages
_=PYTHONPATH
bash-3.2$ cd ~/Downloads/pycam-0.5.1
bash-3.2$ pycam
bash: pycam: command not found
bash-3.2$
bash-3.2$
bash-3.2$

Ran PyCam again with same results.
Thanks again

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

Re: PyCAM on Mac OS X

Post by oldrayj » Mon Nov 19, 2012 10:54 pm

I was about ready try MacPorts but I thought I should try Homebrew again before doing so.

To my amazement, It works! I tinkered around with the last command you provided:

bash
set | grep -i python
cd ~/Downloads/pycam-0.5.1

I get a bunch of command not found lines as above, but, after I got bash-3.2$, I ran it by inputting the path to PyCam: bash-3.2$ /Users/myUserName/Downloads/pycam-0.5.1/pycam . It popped right up, running under X-11.

Greatly appreciated!!!

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

Re: PyCAM on Mac OS X

Post by DanMc » Mon Jan 14, 2013 2:42 am

I gave up on Pycam a while back but thought I would give it another shot. I can get up to the point oldrayj gets to, but instead of the command line not found I get:

Traceback (most recent call last):
File "/Users/myUserName/Downloads/pycam-0.5.1/pycam", line 37, in <module>
import pycam.Gui.common as GuiCommon
File "/Users/myUserName/Downloads/pycam-0.5.1/src/pycam/Gui/__init__.py", line 22, in <module>
import pygtk
ImportError: No module named pygtk

If I try and run the command line to install pygtk from the first post in this thread I get:

Error: pygtkglext-1.1.0 already installed

Any help would be greatly appreciated

tioJim
Posts: 135
Joined: Sun Apr 22, 2012 11:31 am

Re: PyCAM on Mac OS X

Post by tioJim » Mon Jan 14, 2013 7:25 pm

Yeah I kept getting that. I gave up in the end and went the MacPorts route. It got me past that hurdle but there's a second even more stubborn one after that. There's an as yet unresolved bug in gtkglext1 relating to OpenGL that stops the view window in PyCam working. So I can run PyCam but there's nothing to look at! After endless Googling my general conclusion was PyCam isn't really working on OSX unless you're some kind of Python/Linux guru with the patience of a Saint.

I've been running CamBam on a Windows XP install using Parallels. CamBam seems really nice but my MacBook is pretty elderly and I don't have much free HDD space so it's really slow and painful. I'm thinking I'll probably get a dedicated machine for CNC anyway. Maybe get a rack enclosure for it and stick the electronics and PC all in one box.

tioJim
Posts: 135
Joined: Sun Apr 22, 2012 11:31 am

Re: PyCAM on Mac OS X

Post by tioJim » Mon Jan 14, 2013 7:29 pm

I did come across a few posts saying PyCam doesn't perform that well anyway - check this out for example http://www.shapeoko.com/forum/viewtopic.php?f=16&t=555 - unless you use something called 'psyco' but again that's more arcane installation shenanigans.

So far CamBam seems nice and simple to use, is stable and fast.

madmanmoe
Posts: 53
Joined: Mon Jan 28, 2013 10:29 pm
Location: Greater London
Contact:

Re: PyCAM on Mac OS X

Post by madmanmoe » Thu Jan 31, 2013 4:17 am

I followed the steps in the first post exactly.

Just opened up Terminal and started plugging them in (waiting for each to finish first)

It all looked fine, until the last one.

Code: Select all

echo "export PYTHONPATH=/usr/local/lib/python2.7/site-packages" >> ~/.bashrc
When I put that in, nothing discernible happens.

I ignore it, navigate to /Users/me/downloads/pycam-0.5.1 and then enter ./pycam .

Code: Select all

macbook:pycam-0.5.1 me$ ./pycam
Psyco is not available (performance will probably suffer slightly)
Enabled 2 parallel local processes
Failed to import GTK: No module named gtk
PyCAM dependency problem
Error: Failed to load the GTK interface.
Details:
	Python bindings for GTK+: MISSING (Install the package 'python-gtk2')

Detailed list of requirements: http://sf.net/apps/mediawiki/pycam/?title=Requirements
macbook:pycam-0.5.1 me$ 

'brew install pygtk' returns

Error: pygtk-2.24.0 already installed


I know someone else had the same problem but his just seemed to sort itself out. No such luck for me. I have no idea what I'm doing and generally avoid these things, but hopefully I'm close.

Any help would be appreciated.


Also tried

Code: Select all

bash-3.2$ set | grep -i python
PYTHONPATH=/usr/local/lib/python2.7/site-packages
_=PYTHONPATH
not sure of the significance of that.

and

Code: Select all

bash-3.2$ cd ~/Downloads/pycam-0.5.1
bash-3.2$ pycam
bash: pycam: command not found
- Tom
MadManMoe's Blog
eShapeoko #23 Dual Y, Dual X, Dremel 4000, Pololu a4988 steppers run from LinuxCNC

cvoinescu
Posts: 4442
Joined: Thu Jul 19, 2012 6:50 pm
Location: Camberley, UK
Contact:

Re: PyCAM on Mac OS X

Post by cvoinescu » Thu Jan 31, 2013 9:08 am

It's normal for the echo line to output nothing. It's normal for brew to report that pygtk is already installed. The result of the set | grep is consistent with your earlier change. I don't expect typing "pycam" from the directory it's in to work, though. Try "./pycam" (without the quotes).
Proud owner of ShapeOko #709, eShapeOko #0, and of store.amberspyglass.co.uk

bobt
Posts: 132
Joined: Tue Apr 17, 2012 7:08 pm

Re: PyCAM on Mac OS X

Post by bobt » Thu Jan 31, 2013 10:04 pm

Actually even with the quotes it should work.

Bob Teeter
"What Box???" ShapeOko #397

madmanmoe
Posts: 53
Joined: Mon Jan 28, 2013 10:29 pm
Location: Greater London
Contact:

Re: PyCAM on Mac OS X

Post by madmanmoe » Thu Jan 31, 2013 10:24 pm

Thanks for the suggestions guys.

I restarted my computer and re-ran the patch. Then it launched fine.

I'm not sure why, because it said the patch installed fine the first time around.

It's a nifty little tool and makes engraving easy. It doesn't seem to have any good options for a 2.5D workflow though. At the moment I'm having to compute a separate tool-path for each depth I want to mill at, which isn't ideal.
I guess I'll have to look into the Inkscape route, which is annoying because I use Illustrator.

Anyway, it works, thanks Sandro for posting these instructions, they succeeded despite my total lack of understanding.
MadManMoe's Blog
eShapeoko #23 Dual Y, Dual X, Dremel 4000, Pololu a4988 steppers run from LinuxCNC

Post Reply