best way to install python modules on linux

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Fabian Braennstroem

    best way to install python modules on linux

    Hi,

    I am pretty new to python and will use it mainly in
    combination with scientific packages. I am running ubuntu
    breezy right now and see that some packages are out of date.
    Do you have any suggestion, how I can get/keep the latest
    python modules (e.g. scipy, numpy,...) on my ubuntu system?
    I.e. does there exist any script/program, which downloads
    and installs automatically the latest stable releases of selected
    modules? It would be nice, if the program can remove the
    installed modules, too!?

    Or would it be easier to stick to apt/deb and create own
    packages ...


    Greetings!
    Fabian

  • flamesrock

    #2
    Re: best way to install python modules on linux

    You should consider gentoo as it big on python with all the latest
    packages. And no, installing doesn't take much effort.

    Comment

    • Paul Boddie

      #3
      Re: best way to install python modules on linux

      Fabian Braennstroem wrote:[color=blue]
      >
      > I am pretty new to python and will use it mainly in
      > combination with scientific packages. I am running ubuntu
      > breezy right now and see that some packages are out of date.[/color]

      You can quite often backport some of the newer packages from
      packages.ubuntu .com, although this can often lead to a lot of work
      backporting dependencies and working around changes to the build
      environment in more recent Ubuntu work. For example, I promised Tim
      Parkin that I'd look into making Ubuntu Hoary packages for the
      python.org tools, but got substantially slowed down looking into
      backporting the Twisted 2 packages (which are only some of the many
      dependencies that Pyramid seems to have). Of course, I could just do a
      "python setup.py install" and forget about all this, but I don't want
      to discover bizarre behaviour later on in some installed package
      because some other, rarely-used package trampled over some important
      files or caused some naming conflict when it was installed.
      [color=blue]
      > Do you have any suggestion, how I can get/keep the latest
      > python modules (e.g. scipy, numpy,...) on my ubuntu system?
      > I.e. does there exist any script/program, which downloads
      > and installs automatically the latest stable releases of selected
      > modules? It would be nice, if the program can remove the
      > installed modules, too!?[/color]

      The removal part is typically the neglected thing here. My habit right
      now is to package up Python modules into Debian packages and to install
      them that way. Once upon a time, on Red Hat, I played with checkinstall
      [1] to create packages of things that didn't have a "make uninstall"
      feature, but I'm now fairly practised at making Debian packages that
      seem to work - thanks must go to Andrew Kuchling whose packaging
      scripts (from some software which he maintains) served as the basis for
      my own packaging attempts.
      [color=blue]
      > Or would it be easier to stick to apt/deb and create own
      > packages ...[/color]

      There's a big incentive to use the native package system: it works with
      the administration tools you have installed, and your packages should
      then integrate properly with all the other packages on your system.
      I've made packages from my own works and distributed them, and changing
      even a simple command issuing experience to a point-and-click
      installation experience does seem to have a dramatic influence on
      whether people will bother looking at software or not. Plus, they can
      always easily remove the software afterwards. ;-)

      Paul

      [1] http://asic-linux.com.mx/~izto/checkinstall/

      Comment

      • Harry George

        #4
        Re: best way to install python modules on linux

        Fabian Braennstroem <f.braennstroem @gmx.de> writes:
        [color=blue]
        > Hi,
        >
        > I am pretty new to python and will use it mainly in
        > combination with scientific packages. I am running ubuntu
        > breezy right now and see that some packages are out of date.
        > Do you have any suggestion, how I can get/keep the latest
        > python modules (e.g. scipy, numpy,...) on my ubuntu system?
        > I.e. does there exist any script/program, which downloads
        > and installs automatically the latest stable releases of selected
        > modules? It would be nice, if the program can remove the
        > installed modules, too!?
        >
        > Or would it be easier to stick to apt/deb and create own
        > packages ...
        >
        >
        > Greetings!
        > Fabian
        >[/color]

        I find it helpful to leave the as-delivered Python (e.g.,
        /usr/bin/python) as-is. It is being used to run your basic Linux
        system. Screwing around with it can have nasty side effects. Instead
        I build a new one at /usr/local, give it a unique name, and
        upgrade/hack that one to my heart's content. E.g., if the base system
        is using Python 2.2, you can be running Python 2.4 as
        /usr/local/bin/py24, and add all the numerical packages you wish at
        use/local/lib/python2.4/site-packages. Also, make sure root doesn't
        have /usr/local/bin on its PATH (which is a good rule anyway).




        --
        Harry George
        PLM Engineering Architecture

        Comment

        • Fabian Braennstroem

          #5
          Re: best way to install python modules on linux

          Hi Harry,

          * Harry George <harry.g.george @boeing.com> wrote:[color=blue]
          > Fabian Braennstroem <f.braennstroem @gmx.de> writes:
          >[color=green]
          >> Hi,
          >>
          >> I am pretty new to python and will use it mainly in
          >> combination with scientific packages. I am running ubuntu
          >> breezy right now and see that some packages are out of date.
          >> Do you have any suggestion, how I can get/keep the latest
          >> python modules (e.g. scipy, numpy,...) on my ubuntu system?
          >> I.e. does there exist any script/program, which downloads
          >> and installs automatically the latest stable releases of selected
          >> modules? It would be nice, if the program can remove the
          >> installed modules, too!?
          >>
          >> Or would it be easier to stick to apt/deb and create own
          >> packages ...
          >>
          >>
          >> Greetings!
          >> Fabian
          >>[/color]
          >
          > I find it helpful to leave the as-delivered Python (e.g.,
          > /usr/bin/python) as-is. It is being used to run your basic Linux
          > system. Screwing around with it can have nasty side effects. Instead
          > I build a new one at /usr/local, give it a unique name, and
          > upgrade/hack that one to my heart's content. E.g., if the base system
          > is using Python 2.2, you can be running Python 2.4 as
          > /usr/local/bin/py24, and add all the numerical packages you wish at
          > use/local/lib/python2.4/site-packages. Also, make sure root doesn't
          > have /usr/local/bin on its PATH (which is a good rule anyway).[/color]

          Maybe, I should consider this, too. Thanks!

          Greetings!
          Fabian

          Comment

          Working...