Fixing “invalid Python installation” error on Ubuntu Marc 2006-04-092006-06-06 DebianLinuxPythonUbuntu While attempting to install DenyHosts, I got an error about “invalid Python installation”. I found the solution here. Basically just: sudo apt-get install python2.4-dev