I compiled VTK and ITK libraries on both Debian and Archlinux machines.
On these machines I love to be clean and neat so:
- all the software and libs installed by apt-get/pacman are in the dir /usr
- all the libs and software manually compiled are installed in the dir /usr/local
Sometime this introduces some path problems.
For example, installing manually Python packages, I found a "bad install directory or PYTHONPATH" error and a message like this:
"You are attempting to install a package to a directory that is not
on PYTHONPATH and which Python does not read ".pth" files from. "
It means that I'm going to install the Python package in a directory that is not in the search PATH of your Python system. The system looks for packages in /usr/lib/pythonX.X/site-packages but I'm going to install in /usr/local/lib/pythonX.X/site-packages.
In this case, I love the Python solution and so:
- Create a file named altinstall.pth (or use the preferred file name just with the .pth extension) containing the code:
import os, site; site.addsitedir(os.path.expanduser('/usr/local/lib/pythonX.X/site-packages'))
- Put this site in your system python site-packages dir: /usr/lib/pythonX.X/site-packages
Now your Python know where are you new python modules! Clean and easy-to-maintain solution!
P.S
If you need add the /usr/local/bin to your system path
follow the same idea and create a file in /etc/profile.d/ with the code: export PATH=$PATH:/usr/local/bin



The last week I was at the 