Ask Your Question

What is the best way to compile a python program with many old dependencies?

asked 2012-09-19 18:17:22 -0500

Darling85 gravatar image

updated 2012-09-19 18:18:50 -0500

I'm trying to compile a piece of scientific software called sansview. It has a number of dependencies, a previous version of python and libraries, which are not current versions. I've compiled simple programs before using the ./congifure, make and make install route but not something with dependencies which are not in the repositories.

So far I've downloaded the source for all the dependencies. I'm thinking of creating a folder off my home directory with all the dependencies for the compile of sansview as to avoid confusing my system with multiple python versions. I'm unsure about the best way to go about the compile. Any help would be very useful.

I'm using fedora 17 64 bit if that is useful to you.

Many thanks,


edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2012-10-05 09:48:27 -0500

dmalcolm gravatar image

updated 2012-10-05 09:49:20 -0500

Are these libraries C and C++? Many libraries (such as those that use autoconf) respect setting "prefix" at configure-time, so if you do something like:

mkdir ~/my-installation-root/
cd unpacked-sources-of-library
./configure --prefix=~/my-installation-root/
make install

then the "make install" phase will copy the built files into a directory structure below ~/my-installation-root/ and not affect the "system" copies below /usr

You can then set PATH and LD_LIBRARY_PATH accordingly to find them.

edit flag offensive delete link more

answered 2015-07-26 08:59:41 -0500

acyclic gravatar image

Instead of @dmalcolm's good answer, one alternative is to use Docker. Spin up an old Fedora image which has the versions of the dependencies you need, and build & run the application in that image. Docker runs containers on the same kernel as your host OS, so you will have almost no slowdown compared to running it natively. The advantage of this approach is that it can take a very long time to build all the dependencies you need.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2012-09-19 18:17:22 -0500

Seen: 287 times

Last updated: Oct 05 '12