Build Python 2.7/3.3 on CentOS6

 

delete dummy file /usr/include/stropts.h

$cd /tmp
$wget http://www.python.org/ftp/python/3.3.2/Python-3.3.2.tar.bz2
$tar xjvf /install/archive/src/Python-3.3.2.tar.bz2
$cd Python-3.3.2/
$./configure --prefix=/pkg/python/3.3.2 --with-cxx-main=c++
$make -j32

...
Python build finished, but the necessary bits to build these modules were not found:
_gdbm
To find the necessary bits, look in setup.py in detect_modules() for the module's name.
Failed to build these modules:
_tkinter
....
$make install