tags:

views:

120

answers:

2

I'm trying to port my Python app from Windows to Mac. My app uses Psyco. How exactly do I install Psyco on Mac?

Keep in mind I'm a Mac newbie.

A: 

The News page shows that a Mac port is still being written. Learn how to install from source code using Make. Apply that patch, compile, and install.

mcandre
??? The latest relevant news from the URL you give is `6 December 2007: Released Psyco 1.6 with Intel MacOS/X support`. How does that translate into "still being written" and "apply that patch"?!
Alex Martelli
Oh, and, why would anybody need to learn to use Make to run `python setup.py install` at a terminal shell prompt?!
Alex Martelli
+2  A: 

First, you need Apple's XCode installed (well, specifically you only need the gcc compiler that comes with it, but installing the whole thing is simpler;-). If you want the latest and greatest, sign up for ADC at the lowest (free!-) level and download from there; otherwise it should be in your OSX DVD (or, depending on OSX level and how you installed the OS, the installer might already be on your hard disk).

To verify XCode's properly installed, at a Terminal.app enter gcc and you should see a message such as i686-apple-darwin9-gcc-4.0.1: no input files.

Once that works, download psyco's sources from here, unpack them (you probably can get it done during the download, worst case use tar xzf psyco-1.6-src.tar.gz in Terminal.app after cd'ing to the directory you've downloaded that tar.gz to), cd into the new psyco-1.6 directory.

Then do python setup.py install at the Terminal.app shell prompt. Depending on how exactly you installed things, you may need to use sudo python setup.py install and give your password to enable writing into the system directories.

Alex Martelli
You may _need_ the latest and greatest if you're running Tiger -- I seem to recall having trouble due to a too-old gcc.
John Fouhy