More than one python in a linux

Paul Boddie paul at boddie.net
Fri Jan 16 06:31:32 EST 2004


Zunbeltz Izaola <zunbeltz at wm.lc.ehu.es.XXX> wrote in message news:<m165fdbp4t.fsf at llcpxqy.lc.ehu.es>...
> Hi,
> 
> I've build and installed  python 2.2 and python2.3 in a linux box.

I think we need to know...

  * How you built those Python releases: compiled from source, used
    a source RPM or other source package, used a binary RPM or other
    binary package (which really isn't building, however).

  * What kind of Linux distribution you used and whether it had
    Python installed already.

> Now i want to install some packages (Numeric, wxPython and
> scipy). I've install Numeric and wxPython for python2.3 without
> problem (python2.3 setup.py install ... and so on). But when I try 
> 
> python2.2 setup.py install

[...]

> error: invalid Python installation: unable to open /usr/lib/python2.2/config/Makefile (No such file or directory)

This suggests that you don't have the development stuff installed for
that particular Python 2.2 installation. I note that /usr is the
prefix, meaning that either...

  * You built Python from source and specified /usr as the prefix
    instead of using the default /usr/local as prefix. This is
    unlikely as the Makefile would probably be where setup.py is
    looking.

  * You installed a package which put the installation in /usr
    (eg. /usr/bin/python2.2) but which didn't include the
    development stuff. That might mean that you need to find the
    corresponding "devel" package.

  * You already have /usr/bin/python2.2 installed as part of the
    Linux distribution and it is this program that is being run
    when you attempt to install things using setup.py, despite
    the possible existence of a Python 2.2 installation in
    /usr/local. In this case, verify using "which python2.2" the
    actual program being run and adjust your PATH environment
    variable to use your own Python 2.2 installation; for example:

      PATH=/usr/local:$PATH python2.2 setup.py install

I hope this helps you track down the problem. Multiple Python
installations are easy enough to manage and use, especially if you
remember to use python2.2 and python2.3 (as you've done) to control
the version you want to use.

Paul



More information about the Python-list mailing list