matplotlib in it, as well as modify a Cocoa-Python application to link against that Framework. The only thing that looks a little shaky is the PyObjC install, but it still seems like it's working. Not every detail is given, but I hope it's enough.The installer comes from here for
python-2.7.1-macosx10.6.dmg (Mac Installer disk image (2.7.1) for OS X 10.6 and later).I did a stock install except I unchecked
Shell profile updater under Custom.. Not sure why, except I didn't want to spend time figuring out what it does.Python.org installs stuff in
I added this to
.bash_profileI anticipated that
easy_install would be difficult, but I got (something like) it from distribute:I couldn't find any decent docs, though. It looks like they've just copied the
easy_install documentation which I found impossible to figure out so far. But, poking around, I found easy_install and easy_install-2.7 in bin:The way my
$PATH is set up, easy_install runs the wrong Python. That's OK, we just do:pyobjc has lots of warnings but looks OK
Next, I installed
matplotlib using instructions from Gavin Huttley (here, here). Since matplotlib-1.0.0 is available, I went for it. In the make.osx file:I changed it to Python 2.7.
I also needed to update to
libpng-1.2.39 and libfreetype-2.3.11 (although these are not the latest versions.. In fact, I had a bit of trouble with libpng since I got back a file that was really html, though titled as .gz or .bz2 or .xz. I finally found it here). For the other one:As I said, the build instructions were as given at the link.
[UPDATE: Poking around in
libpng file INSTALL, I notice that it says: "Before installing libpng, you must first install zlib, if it is not already on your system." So I'll do it in that order next time.]I tested
matplotlib by running the script from here.Then, I got PyCogent (download link):
I had a few failures:
Some of these are related to executables not present. Looks pretty good. Finally, let's setup a new Xcode project:
Xcode > Cocoa-Python application
change SDK to 10.6
delete Python.framework
drag in new Python.framework
under Targets > X > Link Binary ..
drag in new Python.frameworkSince our Python is a universal binary with 64-bit:
Build the Xcode project as 64-bit as well. Add this to main.py:
And run it from the Console:
It works!