Compiling Python from source on Ubuntu 11.x multiarch

Tuesday 29 November 2011, 23:03:00 | python

Ubuntu 11.x has changed the location for 64/32 bits libraries ("multiarch") and this can cause some hiccups when trying to build Python from source. Make sure to sudo apt-get install dpkg-dev to get the dpkg-architecture tool installed. Otherwise you'll get compile errors because some system libs can't be found (zlib, ssl, etc).

See also http://bugs.python.org/issue11715

And, ofcourse, you'll need to install various -dev packages such as zlib1g-dev to satisfy Python's library dependencies. You can see which ones you're missing by taking a look at the compile output where it complains about failed modules.