Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Version 5 (modified by roger.demetrescu, 13 years ago) (diff)


Note: this entry was moved to TurboGears newsdoc...

I prefer to install turbogears and friends in a user's directory. Here's how I do it:

  1. ~/.pydistutils.cfg tells distutils where to install things. On OS X mine looks like this:
    install_lib = ~/Library/Python/$py_version_short/site-packages
    install_data = ~/Library/Python/$py_version_short/site-packages
    # install_headers =
    install_scripts = ~/bin
    This tells distutils to install in my home directory, in a directory the *Framework* build (not system Python) of Python for Mac OS X will look for it.

(If I install an extension like numarray it wil include headers, and I may be able to use install_headers to put them in ~/include/ . I have not needed this yet.)

For Linux I use this instead, in a layout that mimics the usual /usr/lib/python?.?/site-packages/ or /usr/local/lib/python?.?/site-packages/:

install_lib = ~/lib/python$py_version_short/site-packages
install_data = ~/lib/python$py_version_short/site-packages
install_scripts = ~/bin

The directive install_data is missing from the PEAK documentation as of 27 Jan. 2005.

With easy_install

a explains simple ways to get easy_install to install in a variety of locations.

needs edits

I'd like to see this generalized, because it's a common recipe for any unix-like system. there should also be a note saying that *all* of your easy_installs will follow these rules after these changes.