Q:

Using Python 2.6 while python 2.7 is installed

I have an application which when I run it, it gives me the following error:
paraview: error while loading shared libraries: libpython2.6.so.1.0: cannot open shared object file: No such file or directory

I already have python 2.7 installed. When I type python, I can write codes. It seems it needs Python 2.6. I download and install the python 2.6 by downloading it and running:
./configure
make -j6
make checkinstall

But when I look for libpython2.6.so* in my computer, no files are found and still the application is crying for that. Can anyone please help me?

A:

You are missing the shared Python2.6 library. It does not get build by default, that is why it's not there after you build and installed Python 2.6
Two options: Build new with shared library or install a pre-build package.

To compile with the shared lib, do pretty much what you did in the first place, but configure with --enable-shared
./configure --enable-shared
make -j6
sudo checkinstall
sudo ldconfig

The library should be installed to /usr/lib/x86_64-linux-gnu or something similar like /usr/local/lib and thus be found by the loader. The last command makes the dynamic loader aware of the new library.
Python2.6 is not in the Ubuntu repositories anymore, but you can install it from ppa:fkrull/deadsnakes.

Remove your previous build. Since you installed with checkinstall, this is painless.
Add the repo sudo add-apt-repository ppa:fkrull/deadsnakes
Install sudo apt-get update && sudo apt-get install libpython2.6
(Maybe) If libpython2.6 is not enough, install python2.6 and python2.6-dev

