Archive for March, 2008

Installing Python modules to your home folder on a Mac

It turns out that by default, on Leopard, Python 2.5 looks at ~/Library/Python/2.5/site-packages for Python modules. The problem is that nothing installs there by default. However, distutils (and setuptools) will read settings from ~/.pydistutils.cfg allowing you to configure some default settings for the install and easy_install commands. After a little bit of work, here’s the final result:

[easy_install]

# set the default location to install packages
install_dir = $HOME/Library/Python/2.5/site-packages

[install]
install-base=$HOME
install-purelib=$HOME/Library/Python/2.5/site-packages
install-platlib=$HOME/Library/Python/2.5/site-packages
install-scripts=$HOME/bin
install-data=$HOME/Library/Python/2.5/share
install-headers=$HOME/Library/Python/2.5/Headers

Now I can worry less about what’s going to happen with my Python modules the next time I upgrade.

Getting ready for PyCon Day 2…

It was an exciting first day at PyCon. I met Ben Collins-Sussman, Brian Fitzpatrick (who is just as down to earth as he appears to be), Ted Leung, Steve Holden (Director of the PSF), and many, many other great contributors to the community.

I was completely beat at the end of the day, especially after spending several hours editing slides for a talk I’m supposed to give back home. I slept longer than I have in a very long time–which is refreshing.

So, I’m getting geared up for today. I’m particularly excited about Alex Martelli’s talk on callback patterns and idioms in Python and Jono DiCarlo’s talk on Python Application Development. And I’m really looking forward to meeting a few more people. So if you happen to read this, and you’re at pycon, look for me! Here’s a picture of me (with my two kids):
Me and my two boys