Python On Mac
I need to write lots of Python on my MacOs X IBook...
I really want a Folding Text Editor On Mac
some other Mac-specific notes:
-
if reading/writing log files on multiple platforms, use 'rU' in file-open call for universal-endLine
-
pickle files don't seem to be supported across platforms - made one on MsWindows then copied it over, and when I tried to read it I got an "insecure string pickle" error message. Re-generated the pickle file locally and it worked fine.
-
notes on upgrading
Feb'2006 notes
Tried doing build with Fink Commander, but that didn't work.
Installed Mac Python 2.4 for upgrade. Deleted the 2.3 folder from '~/Applications'
Easy Install (piece of Setup Tools)
-
instructions turned out to have typo (at least for me) - little disutils.cfg file you make needs a '/' between the Python and the '$py_version_short'
-
hmm, it's still using Python 2.3 when it tries to install!
-
when I just launch Python from the command line, I see from the startup lines that it is still running v2.3. In fact, is it too old to even work with Setup Tools?
Python 2.3 (#1, Sep 13 2003, 00:49:11)
-
then I see {{{ Installing easy_install script to /System/Library/Frameworks/Python.framework/Versions/2.3/bin error: /System/Library/Frameworks/Python.framework/Versions/2.3/bin/easy_install: Permission denied}}}
-
Hmm, what various directories/folders do I have for Python?
-
/Library/Frameworks/Python.framework/Versions/ contains '2.4' (and Current) not '2.3'; '2.4' contains bin, lib, include, etc.
-
/System/Library/Frameworks/Python.framework/Versions contains '2.3' not '2.4' - aha!
-
/Library/Python/ contains only '2.3' which contains bunch of standard stuff like site-packages, wx, waste, etc.
-
~/Library/Python/ contains only /IDE-Scripts/ directory
-
~/Library/ doesn't contain Frameworks
I notice that my Mac Python 2.4 is an "official unofficial" version which makes me a bit nervous....
Or maybe some of this stuff is messed up because I need to restart! So that's next...
- nope, that didn't help.
Maybe I need to figure [out](http://developer.apple.com/documentation/Mac O S X/Conceptual/B P Runtime Config/index.html) where the Environmental Variable-s are set, so I can use 2.4
- hmm, the environment.plist doesn't include anything relevant, and the other files don't seem to exist.
(then copying /Library/Python/2.3 to 2.4 ? renaming it? then deleting the /System/.../2.3/ directory?)
Tried deleting the key 2.3 directory, renaming another to 2.4; realized that the 2.4 just didn't include some things that were needed. Which led to.....
April'2006 notes
See new "universal" installer with special Mac binary. Download/install that.
-
remove older 2.4 folder from Applications folder; run Update Shell Profile.command
-
type python at command-line, launches and says it's running 2.4.3
-
try double-clicking on IDLE icon, on launch get "quit unexpectedly" message::
Exception: EXC_BAD_ACCESS (0x0001) Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x00000000
Going to go on with non-GUI stuff and see what happens...
Setup Tools/Easy Install: download ez_setup.py to desktop, drag onto Python Launcher, appears to install '0.6a11' fine.{{{ Downloading http://cheeseshop.python.org/packages/2.4/s/setuptools/setuptools-0.6a11-py2.4.egg Processing setuptools-0.6a11-py2.4.egg creating /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/setuptools-0.6a11-py2.4.egg Extracting setuptools-0.6a11-py2.4.egg to /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages Adding setuptools 0.6a11 to easy-install.pth file Installing easy_install script to /Library/Frameworks/Python.framework/Versions/2.4/bin Installing easy_install-2.4 script to /Library/Frameworks/Python.framework/Versions/2.4/bin Installed /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/setuptools-0.6a11-py2.4.egg Processing dependencies for setuptools==0.6a11 Setuptools version 0.6a11 or greater has been installed. (Run "ez_setup.py -U setuptools" to reinstall or upgrade.) Exit status: 0 }}}
Move on to Python Paste (Apr'2006-Feb'2007)
Then (Feb-Oct'2007) onto Robaccia.
Feb'2008: note some changes associated with moving to new MacBook/Leopard.
Apr'2008: time to move to Google App Engine? dunno
Mar'2009: Django
Edited: | Tweet this! | Search Twitter for discussion