trentm.com FAQ

Troubleshooting Python Package Installation

My install on Linux fails with "error: invalid Python installation: unable to open /usr/lib/python2.4/config/Makefile"

The install instructions for many of the Python packages on trentm.com have you run:

python setup.py install

This has been known to fail on some Linux distributions (e.g. Ubuntu) when using the system Python (/usr/bin/python):

$ /usr/bin/python setup.py install
running install
error: invalid Python installation: unable to open /usr/lib/python2.4/config/Makefile (No such file or directory)

setup.py is a Python setup script using Python's standard distutils system. To install a Python module it needs to use the Makefile with which Python was built. This is typically in a Linux distro's Python development package -- which may not be installed by default.

On Ubuntu, if you get this failure, you need to install the "python-dev" package:

sudo apt-get install python-dev