Hi all.
I'm trying install python 3.1.2 on RHEL4 from source, but 'make' failed to build some necessary modules. Followings are from build log:

*** WARNING: importing extension "_ctypes" failed with <class 'AttributeError'>: 'module' object has no attribute 'load_dynamic'

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


Failed to build these modules:
_bisect _codecs_cn _codecs_hk
_codecs_iso2022 _codecs_jp _codecs_kr
_codecs_tw _collections _csv
_ctypes _ctypes_test _curses
_curses_panel _dbm _elementtree
_gdbm _hashlib _heapq
_json _lsprof _multibytecodec
_multiprocessing _pickle _random
_sha256 _sha512 _socket
_ssl _struct _testcapi
array atexit audioop
binascii bz2 cmath
crypt datetime fcntl
grp itertools math
mmap nis operator
ossaudiodev parser pyexpat
readline resource select
spwd syslog termios
time unicodedata zlib

Any ideas?

DOn't you need to pass a flag to ./configure, like --enable-shared ? Check your configure options.

thanks, now I will try

same result...:-(
This is a part of make's log:

gcc -pthread -shared build/temp.linux-i686-3.1/usr/src/Python-3.1.2/Modules/_ctypes/_ctypes.o build/temp.linux-i686-3.1/usr/src/Python-3.1.2/Modules/_ctypes/callbacks.o build/temp.linux-i686-3.1/usr/src/Python-3.1.2/Modules/_ctypes/callproc.o build/temp.linux-i686-3.1/usr/src/Python-3.1.2/Modules/_ctypes/stgdict.o build/temp.linux-i686-3.1/usr/src/Python-3.1.2/Modules/_ctypes/cfield.o build/temp.linux-i686-3.1/usr/src/Python-3.1.2/Modules/_ctypes/malloc_closure.o build/temp.linux-i686-3.1/usr/src/Python-3.1.2/Modules/_ctypes/libffi/src/prep_cif.o build/temp.linux-i686-3.1/usr/src/Python-3.1.2/Modules/_ctypes/libffi/src/x86/ffi.o build/temp.linux-i686-3.1/usr/src/Python-3.1.2/Modules/_ctypes/libffi/src/x86/sysv.o -L/usr/local/lib -L. -lpython3.1 -o build/lib.linux-i686-3.1/_ctypes.so
*** WARNING: importing extension "_ctypes" failed with <class 'AttributeError'>: 'module' object has no attribute 'load_dynamic'

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


Failed to build these modules:
_bisect _codecs_cn _codecs_hk
_codecs_iso2022 _codecs_jp _codecs_kr
_codecs_tw _collections _csv
_ctypes _ctypes_test _curses
_curses_panel _dbm _elementtree
_gdbm _hashlib _heapq
_json _lsprof _multibytecodec
_multiprocessing _pickle _random
_sha256 _sha512 _socket
_ssl _struct _testcapi
array atexit audioop
binascii bz2 cmath
crypt datetime fcntl
grp itertools math
mmap nis operator
ossaudiodev parser pyexpat
readline resource select
spwd syslog termios
time unicodedata zlib

running build_scripts

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.