On a Ubuntu (10.10) system, I have a Python package that installs itself into
/usr/local/lib/python2.6/site-packages/. This isn't contained in the default path (sys.path). How do I add this directory to the path?
$PYTHONPATH environment variable is a solution, of course, but I'm looking for a more elegant way to do this. For example
easy_install also puts installed packages in it, my sys.path looks something like this:
['', '/usr/local/lib/python2.6/dist-packages/keyring-0.5.1-py2.6.egg', '/usr/lib/python2.6', '/usr/lib/python2.6/plat-linux2', '/usr/lib/python2.6/lib-tk', '/usr/lib/python2.6/lib-old', '/usr/lib/python2.6/lib-dynload', '/usr/local/lib/python2.6/dist-packages', '/usr/lib/python2.6/dist-packages', '/usr/lib/python2.6/dist-packages/PIL', '/usr/lib/pymodules/python2.6', '/usr/lib/pymodules/python2.6/gtk-2.0']
so the path is obviously not the default built into the Python binary.
Is there a single config file that contains the entries above? Or in what ways is it possible to modify it?