Thursday, October 15, 2009

Installing python packages

There is a vast library of python code available to tap into. It's all available at the Python Package Index (pypi).

In order to connect the Django app to the PostgreSQL database, I had to install psycopg2, which is Python's PostgreSQL database adapter.

Debian makes this easy for us because python-psycopg2 is maintained as part of Debian's repos. If this was not the case, then I would have to wget the tarball, extract it, and run 'python setup.py install' for the package. In order for that command to work, one has to have the dev package for your version of python installed. In my case, that would be 'python2.5-dev.' This package provides header files for building your own modules from scratch.

There's a lot of jargon in this post which would be familiar to any intermediate Linux user. I will come back at a later date and provide a glossary similar to the bullet points I added to my git post.

No comments:

Post a Comment