I am trying to install Python 2.7.2
from source files in my Linux
machine. But I am running into the following problem which has been discussed earlier.
Traceback (most recent call last):
File "/a/b/python2.7.2/linux26_x86_64/lib/python2.7/compileall.py", line 16, in <module>
import struct
File "/a/b/python3.7.2/linux26_x86_64/lib/python2.7/struct.py", line 1, in <module>
from _struct import *
ImportError: No module named _struct
gmake: *** [libinstall] Error 1
I followed the link provided in the answer and tried a suggestion by Hans Lellelid (hozn) to modify site.py
but still no luck.
My system details are:
% cat /etc/*-release
CentOS release 4.6 (Final)
% uname -av
Linux scdbuild04 2.6.9-67.ELsmp #1 SMP Fri Nov 16 12:49:06 EST 2007 x86_64 x86_64 x86_64 GNU/Linux
% gcc -v
Reading specs from /usr/lib/gcc/x86_64-redhat-linux/3.4.6/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-java-awt=gtk --host=x86_64-redhat-linux
Thread model: posix
gcc version 3.4.6 20060404 (Red Hat 3.4.6-9)