When installing python 2.6, I used: ./configure --prefix=/home/name/usr Installation was fine and everything was installed to: ~/usr/lib/python2.6 But the .so files were installed to: ~/usr/lib/python As ~/usr/lib/python was (no longer) declared in my PYTHONPATH, I ran into import issues. The problem was due to a forgotten file: ~/.pydistutils.cfg So this is clearly a user error, but I wonder if it is something which should be avoided at the setup.py level. When installing python, the installation locations are derived from the results of ./configure. When setup.py is eventually called, the installation locations can change. This seems undesirable. Would it be better if setup.py instructed distutils to ignore any configuration file so that the installation directories matched what was used by the rest of 'make install'? Related: http://bugs.python.org/issue1180
rdm notes in duplicate Issue6138: There is a bug here, of some sort. Either the .pydistutils.cfg file's install clause should override the default --prefix somehow, or the error message should indicate where the setting for 'home' and '--prefix' came from to enable the user to debug the configuration. In the latter case there would also need to be a way to explicitly tell either make install or configure to ignore .pydistutils.cfg. In the former case, an explicit --prefix passed to configure would need to override .pydistutils.cfg.