best way to install python modules on linux

Paul Boddie paul at boddie.org.uk
Fri Apr 7 14:56:24 EDT 2006


Fabian Braennstroem wrote:
>
> 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/




More information about the Python-list mailing list