Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an AIX 6.1 system that I've compiled and installed:

  • Apache 2.2.21 (into /usr/local/mercurial)
  • Python 2.7.2 (into /usr/local/bin and /usr/local/lib)
  • mod_wsgi 3.3 (with the AIX fix #1 described here)
  • Mercurial 2.0 (system-wide)

However, when Apache starts, I get the following message in error_log:

IOError: invalid Python installation: unable to open /usr/local/bin/lib/python2.7/config/Makefile (No such file or directory)

See the problem? bin/lib doesn't exist. /usr/local/lib/python2.7/config/Makefile does exist though. However, I can't figure out where it's getting that path from. Here's the environment variables I've got:


I've tried all sorts of combinations with and without PYTHONHOME, PYTHONLIB and PATH in envvars. My PATH, in case it matters is:

share|improve this question
I created a 'lib' directory under /usr/local/bin and then created a link to /usr/local/lib/python2.7 just to see if it would accept it temporarily. Now it's moved on to complaining about /usr/local/bin/include/python2.7/pyconfig.h which obviously doesn't exist. It should be going to /usr/local/include. Where is it getting all of these invalid paths from? – jasonh Nov 17 '11 at 23:33
Take out both the PYTHONHOME and PYTHONPATH variables completely and what do you get? PYTHONHOME is set wrong and PYTHONPATH shouldn't be needed. – Graham Dumpleton Nov 18 '11 at 0:19

PYTHONHOME shouldn't be need. Also, try setting it to /usr/local (the default).

From the documentation:

By default, the libraries are searched in prefix/lib/pythonversion and exec_prefix/lib/pythonversion, where prefix and exec_prefix are installation-dependent directories, both defaulting to /usr/local.

When PYTHONHOME is set to a single directory, its value replaces both prefix and exec_prefix.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.