Module import problem: _socket
timr at probo.com
Sun Jul 29 07:14:06 CEST 2001
Scott Kelley <kelleys at ucsu.colorado.edu> wrote:
>I just installed Python 2.1.1 on a machine running
>Slackware 3.5 (over Python 1.5.2) and I get the
>following error while importing some newly installed
> File "/usr/local/lib/python2.1/socket.py", line 41, in ?
> from _socket import *
>ImportError: No module named _socket
>I can't find this module in the Python lib (naturally).
>Has anyone out there encountered a similar problem?
I ran into this exact same issue building Python 2.1.1 from source on a Red
Hat 6.1 system. At Guido's suggestion, I'm trying to chase through
setup.py to find out why it decided not to build _socket, but when I reran
the script to debug it, it DID decide to build it. Right now, I'm boggled,
but since it did work, I feel less pressured to chase it down.
You can work around this by editing Modules/Setup and uncommenting the
second _socket statement. Then rebuild Python, and off you go.
- Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.
More information about the Python-list