On the installation of external Python modules

Wim R. Cardoen wcardoen at gmail.com
Thu May 27 15:46:35 EDT 2010


Hello,

In the past I installed different versions of python (using gcc) e.g. 2.5.4,
2.6.4
at the following places:

/wim/pkg/python/2.5.4
/wim/pkg/python/2.6.4

I installed the numpy, scipy, matplotlib, dadi modules
using the command:
/wim/pkg/python/2.5.4/bin/python setup.py install
--prefix=/wim/pkg/python/2.5.4
As a result the working modules got installed under:
/wim/pkg/python/.5.4/lib/python2.5/site-packages/dadi
/wim/pkg/python/.5.4/lib/python2.5/site-packages/numpy
/wim/pkg/python/.5.4/lib/python2.5/site-packages/scipy
/wim/pkg/python/.5.4/lib/python2.5/site-packages/matplotlib

Question 1: Is it correct when I state that the above scipy, numpy,
modules can only be used by the python2.5.4 executable or
can I also use in python2.6.4 if I modify the PYTHONHOME and PYTHONPATH
variables?
Does one have to recompile all its external libraries for use with an
updated python version?
(assuming that the glibc is identical)


I also tried to install the external libraries (e.g. numpy) in different
directories than the main
python directories by specifying e.g. --prefix=/wim/pkg/pylib/   (in the
case of using python2.6.5)*
*I noticed that the suffix was still of the form
"lib/pythonx.y/site-packages/numpy"
Therefore, I wonder:

a. How can one (elegantly) force numpy to be installed under (using python
2.6.2 and python2.6.5):
/wim/pkg/pylib/lib/python2.6.4/.
/wim/pkg/pylib/lib/python2.6.5
b. How can one (elegantly) install different versions of the same package
using the same python binary (2.6.4) as e.g:
 /wim/pkg/pylib/lib/python2.6/site-packages/numpy0.70
/wim/pkg/pylib/lib/python2.6/site-packages/numpy0.71

or is this the wrong approach?



Thanks,

Wim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100527/113468da/attachment.html>


More information about the Python-list mailing list