More than one python in a linux

Z

Zunbeltz Izaola

Hi,

I've build and installed python 2.2 and python2.3 in a linux box.
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

I get the following error (for wxpython)

running build_py
copying wxPython/__version__.py -> build/lib.linux-i686-2.2/wxPython
running build_ext
error: invalid Python installation: unable to open /usr/lib/python2.2/config/Makefile (No such file or directory)

and (for numeric something similar)

Traceback (most recent call last):
File "setup.py", line 195, in ?
ext_modules = ext_modules
File "/var/tmp/python-2.2.2-build//usr/lib/python2.2/distutils/core.py", line 138, in setup
File "/var/tmp/python-2.2.2-build//usr/lib/python2.2/distutils/dist.py", line 893, in run_commands
File "/var/tmp/python-2.2.2-build//usr/lib/python2.2/distutils/dist.py", line 912, in run_command
File "/usr/lib/python2.2/cmd.py", line 112, in ensure_finalized
line = self.cmdqueue[0]
File "/var/tmp/python-2.2.2-build//usr/lib/python2.2/distutils/command/install.py", line 267, in finalize_options
File "/var/tmp/python-2.2.2-build//usr/lib/python2.2/distutils/sysconfig.py", line 421, in get_config_vars
File "/var/tmp/python-2.2.2-build//usr/lib/python2.2/distutils/sysconfig.py", line 326, in _init_posix
distutils.errors.DistutilsPlatformError: invalid Python installation: unable to open /usr/lib/python2.2/config/Makefile (No such file or directory)

Any idea about what can I do?
Thaks in advance

Zunbeltz
 
D

David M. Cooke

At some point said:
Hi,

I've build and installed python 2.2 and python2.3 in a linux box.
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

I get the following error (for wxpython)

running build_py
copying wxPython/__version__.py -> build/lib.linux-i686-2.2/wxPython
running build_ext
error: invalid Python installation: unable to open
/usr/lib/python2.2/config/Makefile (No such file or directory)

You probably don't have the development package for python2.2
installed (python2.2-dev or python2.2-devel or something).
 
Z

Zunbeltz Izaola

(e-mail address removed) (David M. Cooke) writes:

You probably don't have the development package for python2.2
installed (python2.2-dev or python2.2-devel or something).

You are right! I've installed it and it semms that now all goes well.
Thanks.

Zunbeltz
 
P

Paul Boddie

Zunbeltz Izaola said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top