More than one python in a linux

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Zunbeltz Izaola

    More than one python in a linux

    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_finalize d
    line = self.cmdqueue[0]
    File "/var/tmp/python-2.2.2-build//usr/lib/python2.2/distutils/command/install.py", line 267, in finalize_option s
    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.error s.DistutilsPlat formError: 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: zunbeltz@wm.lc. ehu.esXXX
  • David M. Cooke

    #2
    Re: More than one python in a linux

    At some point, Zunbeltz Izaola <zunbeltz@wm.lc .ehu.es.XXX> wrote:
    [color=blue]
    > 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)[/color]

    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)phy sics(dot)mcmast er(dot)ca

    Comment

    • Zunbeltz Izaola

      #3
      Re: More than one python in a linux

      cookedm+news@ph ysics.mcmaster. ca (David M. Cooke) writes:

      [color=blue]
      > You probably don't have the development package for python2.2
      > installed (python2.2-dev or python2.2-devel or something).
      >[/color]

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

      Zunbeltz
      [color=blue]
      > --
      > |>|\/|<
      > /--------------------------------------------------------------------------\
      > |David M. Cooke
      > |cookedm(at)phy sics(dot)mcmast er(dot)ca[/color]

      --
      Remove XXX from email: zunbeltz@wm.lc. ehu.esXXX

      Comment

      • Paul Boddie

        #4
        Re: More than one python in a linux

        Zunbeltz Izaola <zunbeltz@wm.lc .ehu.es.XXX> wrote in message news:<m165fdbp4 t.fsf@llcpxqy.l c.ehu.es>...[color=blue]
        > Hi,
        >
        > I've build and installed python 2.2 and python2.3 in a linux box.[/color]

        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.
        [color=blue]
        > 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[/color]

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

        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

        Comment

        Working...