On 8/15/07, Christoph Haas <[EMAIL PROTECTED]> wrote:
> Morale: never install eggs on a Debian-based system.

Use workingenv when trying out a new version of Pylons, so that you
can delete the entire environment easily.  It's also great for
developing an application and trying them out under several different
version scenarios.  You can also use it in production by running
'activate' in a wrapper shell script (or init.d script in some
distros), or otherwise setting the PYTHONPATH and PATH to point into
the workingenv for that application.

If you want to install eggs systemwide and you aren't convinced by
Christoph's dire prophetic warnings, *don't* install into the
/usr/lib/python2.5/site-packages your distro provides.  That's for
your distro's packages.  Install under /usr/local/lib instead, or
~/lib.  Debian/Ubuntu automatically search for packages in
/usr/local/lib/python2.5/site-packages.  Macintosh has another
directory for local Python packages.  But that doesn't help the fact
that easy_install installs into /usr/lib by default.  So you have to
tell it to install packages elsewhere.

The instructions are in
http://peak.telecommunity.com/DevCenter/EasyInstall#custom-installation-locations
(That's EasyInstall's home page.)

You can do a straight "Administrator installation" and that will give
each user their own Python library in their home directory.  Setting
it up in /usr/local requires a slight modification of the
instructions:

1) Create a file /usr/lib/python2.5/site-packages/local,pth containing
"/usr/local/lib/python2.5/site-packages".
(You can leave off the "site-packages" part or choose any other directory.)

2) Create a file /usr/lib/python2.5/distutils/distutils.cfg containing:

    [install]
    install_lib = /usr/local/lib/python2.5/site-packages
    install_scripts = /usr/local/bin

    [easy_install]
    site_dirs = /usr/local/lib/python2.5/site-packages
    zip_ok = 0

(zip_ok=0 forces all eggs to be installed as directories rather than
zipfiles.  I prefer that because it's easier to browse the source.)

3) Create the lib and bin directories if they don't exist.

4) Download the latest Setuptools from PyPI and run it as a shell script.
    http://pypi.python.org/pypi/setuptools/0.6c6.

Now packages you easy_install will go into the local directory, and
Debian/Ubuntu packages will go into the system site-packages (even if
they're eggs).

-- 
Mike Orr <[EMAIL PROTECTED]>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to