By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,215 Members | 1,936 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,215 IT Pros & Developers. It's quick & easy.

More than one python in a linux

P: n/a
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
--
Remove XXX from email: zu******@wm.lc.ehu.esXXX
Jul 18 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
At some point, Zunbeltz Izaola <zu******@wm.lc.ehu.es.XXX> wrote:
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).

--
|>|\/|<
/--------------------------------------------------------------------------\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
Jul 18 '05 #2

P: n/a
co**********@physics.mcmaster.ca (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
--
|>|\/|<
/--------------------------------------------------------------------------\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca


--
Remove XXX from email: zu******@wm.lc.ehu.esXXX
Jul 18 '05 #3

P: n/a
Zunbeltz Izaola <zu******@wm.lc.ehu.es.XXX> wrote in message news:<m1************@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
Jul 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.