Building 2.1.1 on Python

Guido van Rossum guido at python.org
Wed Jul 25 13:31:43 EDT 2001


Tim Roberts <timr at probo.com> writes:

> I upgraded by old Linux RedHat 6.1 machine from Python 1.5 to Python 2.1.1
> today, and I encountered a surprise.
> 
> After untarring, I did:
>   ./configure --with-threads
>   make
>   make install
> 
> I then tried loading a Webware page as a test, and to my dismay got an
> error.  In socket.py, the line "from _socket import *" failed saying that
> module _socket was not found.
> 
> Eventually, I went into Modules/Setup and uncommented one of the two
> _socket declarations, rebuilt, and it worked fine, but I was surprised that
> the out-of-the-box installation didn't work.
> 
> SHould I have been surprised?  Or did I miss something?
> 
> Almost everything in Modules/Setup is commented out, although many of the
> commented-out modules work perfectly well.  Are those loaded in some other
> way?

The _socket module, as almost all extensions, is built by the setup
script, which is run by the Makefile after building the Python
binary.  It would be instructive to look at the setup.py script and
figure out why it decided not to build _socket -- maybe yo can put a
few print statements in there to debug this further.

--Guido van Rossum (home page: http://www.python.org/~guido/)



More information about the Python-list mailing list