Hoping I might have better luck with Python-3.1.3, I tried it instead and got a little farther...
The make gave me this same warning:
Python build finished, but the necessary bits to build these modules were not found:
_curses _curses_panel _dbm
_gdbm _hashlib _sqlite3
_ssl _tkinter bz2
readline zlib
To find the necessary bits, look in setup.py in detect_modules() for the module's name.
. . .
So, I checked setup.py but couldn't really figure anything out from that code (still need to learn Python), so ignored this message for now in hopes that I don't need these things yet and went ahead with the final make install step. Part way through, I started to get the same sort of error in the Python 3.1.3 version, but it seemed to recover from it better:
PYTHONPATH=/usr/local/lib/python3.1 \
./python -Wi /usr/local/lib/python3.1/compileall.py \
-d /usr/local/lib/python3.1 -f \
-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
/usr/local/lib/python3.1
Traceback (most recent call last):
File "/usr/local/lib/python3.1/compileall.py", line 17, in <module>
import struct
File "/usr/local/lib/python3.1/struct.py", line 12, in <module>
from _struct import *
ImportError: No module named _struct
make: [libinstall] Error 1 (ignored)
PYTHONPATH=/usr/local/lib/python3.1 \
./python -Wi -O /usr/local/lib/python3.1/compileall.py \
-d /usr/local/lib/python3.1 -f \
-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
/usr/local/lib/python3.1
Traceback (most recent call last):
File "/usr/local/lib/python3.1/compileall.py", line 17, in <module>
import struct
File "/usr/local/lib/python3.1/struct.py", line 12, in <module>
from _struct import *
ImportError: No module named _struct
make: [libinstall] Error 1 (ignored)
PYTHONPATH=/usr/local/lib/python3.1 \
./python -Wi /usr/local/lib/python3.1/compileall.py \
-d /usr/local/lib/python3.1/site-packages -f \
-x badsyntax /usr/local/lib/python3.1/site-packages
Traceback (most recent call last):
File "/usr/local/lib/python3.1/compileall.py", line 17, in <module>
import struct
File "/usr/local/lib/python3.1/struct.py", line 12, in <module>
from _struct import *
ImportError: No module named _struct
make: [libinstall] Error 1 (ignored)
PYTHONPATH=/usr/local/lib/python3.1 \
./python -Wi -O /usr/local/lib/python3.1/compileall.py \
-d /usr/local/lib/python3.1/site-packages -f \
-x badsyntax /usr/local/lib/python3.1/site-packages
Traceback (most recent call last):
File "/usr/local/lib/python3.1/compileall.py", line 17, in <module>
import struct
File "/usr/local/lib/python3.1/struct.py", line 12, in <module>
from _struct import *
ImportError: No module named _struct
make: [libinstall] Error 1 (ignored)
PYTHONPATH=/usr/local/lib/python3.1 \
./python -Wi -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/local/lib/python3.1/lib2to3/pygram.py", line 11, in <module>
from .pgen2 import driver
File "/usr/local/lib/python3.1/lib2to3/pgen2/driver.py", line 21, in <module>
import logging
File "/usr/local/lib/python3.1/logging/__init__.py", line 26, in <module>
import sys, os, time, io, traceback, warnings
ImportError: No module named time
make: [libinstall] Error 1 (ignored)
Creating directory /usr/local/include/python3.1
/usr/bin/install -c -m 644 ./Include/abstract.h /usr/local/include/python3.1
/usr/bin/install -c -m 644 ./Include/asdl.h /usr/local/include/python3.1
. . . (etc.) . .
changing mode of /usr/local/lib/python3.1/lib-dynload/ to 755
running install_scripts
copying build/scripts-3.1/2to3 -> /usr/local/bin
copying build/scripts-3.1/pydoc3 -> /usr/local/bin
copying build/scripts-3.1/idle3 -> /usr/local/bin
changing mode of /usr/local/bin/2to3 to 755
changing mode of /usr/local/bin/pydoc3 to 755
changing mode of /usr/local/bin/idle3 to 755
running install_egg_info
Writing /usr/local/lib/python3.1/lib-dynload/Python-3.1.3-py3.1.egg-info
/usr/bin/install -c -m 644 ./Misc/python.man \
/usr/local/share/man/man1/python3.1.1
if test -f /usr/local/bin/python3 -o -h /usr/local/bin/python3; \
then rm -f /usr/local/bin/python3; \
else true; \
fi
(cd /usr/local/bin; ln python3.1 python3)
rm -f /usr/local/bin/python3-config
(cd /usr/local/bin; ln -s python3.1-config python3-config)
rm -f /usr/local/lib/pkgconfig/python3.pc
(cd /usr/local/lib/pkgconfig; ln -s python-3.1.pc python3.pc)
[root@skye Python-3.1.3]#
. . . so then I crossed my fingers and tried yum again, finally getting different results (so I am not crazy after all?):
[root@skye Python-3.1.3]# yum info
Fatal Python error: Py_Initialize: can't initialize sys standard streams
Traceback (most recent call last):
File "/usr/lib64/python2.7/encodings/utf_8.py", line 9, in <module>
Aborted (core dumped)
. . . I then spotted the "2.7" in the error, which is actually not even the "2.7.1" version that I installed previously. So this means that Python is hardcoding the config somewhere. I decided to look for PYTHONHOME environment variable, and sure enough:
[root@skye Python-3.1.3]# env|grep PY
PYTHONOPTIMIZE=true
PYTHONHOME=/usr/lib64/python2.7
PYTHONPATH=/usr/lib64/python2.7
. . . So I am getting closer anyway.
It turns out that there is an ongoing problem with configuring Python on 64 bit systems as well which may have something to do with all of this. Check here:
http://bugs.python.org/issue858809