How Do I Install Python Modules To The Unified Installer?
Up to Table of ContentsThis FAQ applies to: Any version.
The easiest way to work with a particular Python for a particular Plone installation is to put that Python first on your PATH:
$ export PATH=/opt/Plone-3.0.4/Python-2.4.4/bin:$PATH
$ which python
/opt/Plone-3.0.4/Python-2.4.4/bin/python
For python-ldap you should then be able to to:
$ python setup.py install
Note that this is basically the same as this:
$ /opt/Plone-3.0.4/Python-2.4.4/bin/python setup.py install
But manipulating your PATH environment variable just saves you a lot of typing. You can also create aliases in your shell profile (~/.bashrc on linux, ~/.profile on Mac OS X) to make it easier to put a particular Python first on your PATH:
# in your .bashrc or .profile
alias py4prod="export PATH=/opt/Plone-3.0.4/Python-2.4.4/bin:$PATH"
alias py4dev="export PATH=/opt/Plone-3.1/Python-2.4.4/bin:$PATH"
Then on your shell just type:
$ py4prod
$ echo $PATH
$ /opt/Plone-3.0.4/Python-2.4.4/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
Credits
This FAQ is reproduced from a forum message by Kevin Teague. Thanks, Kevin, for all your great, detailed explaining!