best way to install python modules on linux

  • Thread starter Fabian Braennstroem
  • Start date
F

Fabian Braennstroem

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
 
F

flamesrock

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

Paul Boddie

Fabian said:
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.

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.
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!?

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.
Or would it be easier to stick to apt/deb and create own
packages ...

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/
 
H

Harry George

Fabian Braennstroem said:
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

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).
 
F

Fabian Braennstroem

Hi Harry,

* Harry George said:
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).

Maybe, I should consider this, too. Thanks!

Greetings!
Fabian
 

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

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,586
Members
45,084
Latest member
HansGeorgi

Latest Threads

Top