software, business, and fun
cambodia

python notes

while the original project to use python appears to be dead, i still want to do more with python.

i prefer the macports install, but apple’s stock config is listed here too.

python stack:

1. python binary/release

os x runs behind. ships with 2.3 for now.

/System/Library/Frameworks/Python.framework/Versions/Current -> 2.3
/System/Library/Frameworks/Python.framework/Versions/2.3
/usr/lib/python2.3 -> /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3
/usr/lib/python2.3/site-packages is where our packages can live.

2. readline is broken in apple’s python

http://www.friday.com/bbum/2006/03/06/python-mac-os-x-and-readline/

install readline 5.1, install python hack, good to go

3. package management - would like to use macports.

macports wants python 2.4.4 - okay. going to ignore apple’s then.

sudo port install py-sqlite py-docutils py-mx
export PYTHONBIN=/opt/local/Library/Frameworks/Python.framework/Versions/Current/bin
export PATH=$PYTHONBIN:$PATH

4. put django into our site library. original project was untested past svn 5024.

ln -s ~/code/django-5024/django /opt/local/lib/python2.4/site-packages

5. django-admin.py needs love so we can run it

ln -s /opt/local/lib/python2.4/site-packages/django/bin/django-admin.py /opt/local/bin/django-admin.py

0 comments

There are no comments yet...

Kick things off by filling out the form below.

Leave a Comment