[reportlab-users] Using multiple versions in parallel?

Andy Robinson andy at reportlab.com
Wed Dec 17 04:41:41 EST 2008


2008/12/17 Dirk Holtwick <dirk.holtwick at gmail.com>:

> Hi Dinu,

>

> I use "virtualenv" http://pypi.python.org/pypi/virtualenv/ and I can highly

> Try it, it will change your life ;)


This worked for me as well.

We're more "low-tech" with our usual projects with a solution which predates
virtualenv by many years: each project we work on
has a standard directory which is supposed to be on the path, and one
can symlink or checkout the needed versions of reportlab, PIL, django
or whatever that the project needs. We also tend to use a shell script
to invoke each Python script, which makes sure that ONLY the
main directory is on the PYTHONPATH. And site-packages contains
nothing which would vary. The servers work the same. We've had this
pattern for some time.

In summary, put NOTHING which you might need to change in
site-packages; and put everything a project needs to import
in the project directory.

BTW this is another reason why I dislike both distutils and
setuptools. The default
behaviour is to put everything in site-packages - a system-wide installation
- which encourages clashes and confusion. I really think the simplest and
safest installation process for Python was years ago when they would say
"unzip foo.tgz and copy bar to your python path"

- Andy


More information about the reportlab-users mailing list