somewhere near the beginning.

User directory python package installation

Filed under: Programming — Alex @ 10:36 pm 3/21/2007

I’ve been restless this week– now that I have some free time, I find that I want to work on something– so even though my python books haven’t arrived yet, I’ve decided to dive in. My ultimate goal is unclear, but it has something to do with manipulating font glyphs, so after some research I determined that FontTools and TTFQuery meet my needs. It’d be dumb to start installing packages to the system-wide python repository when I’ve forgotten the little I used to know, so I resigned myself to spending hours figuring out how to install packages locally, downloading the packages, compiling them and resolving problems, etc. However, thanks to easy_install, setting up a user directory based ‘virtual python’ and installing the packages was as simple as:

python virtual-python.py
~/bin/python ez_setup.py
~/bin/easy_install Desktop/fonttools-2.0b1.tgz
~/bin/easy_install Desktop/TTFQuery-1.0.0.tar.gz

Update
Now I’m looking through the Python documentation and find that installing packages to your home directory isn’t that bad with dist-utils:
python setup.py install --home=~
I wonder if the two methods are compatible? The directory structure that dist-utils uses is the same as that the virtual python installation uses, so maybe adding a package either way is equivalent. I’d like this: the virtual python idea is neater, but it has less support than dist-utils.

Possibly relevant posts:

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment