smtplib

Tim Roberts timr at probo.com
Tue Dec 11 02:07:43 EST 2001


"Senthil Kumar" <prasent at home.com> wrote:

>I compiled and installed python 2.1.1 in my linux server, I tried to send an
>e-mail using python. I wrote a script to import smptlib and send the test
>message, I get the following error
>
>--
> import smtplib
>Traceback (most recent call last):
>  File "<stdin>", line 1, in ?
>  File "/usr/local/lib/python2.1/smtplib.py", line 42, in ?
>    import socket
>  File "/usr/local/lib/python2.1/socket.py", line 41, in ?
>    from _socket import *
>ImportError: No module named _socket
>
>I am not sure if this is bug or or I missed something during my python
>compilation.

I encountered the same problem when building Python 2.1.1 on Linux.  For
some reason, the installer decided not to build the _socket module.  I
solved it by uncommenting the _socket line in Modules/Setup and rebuilding.

I was never able to chase down the true cause.
--
- Tim Roberts, timr at probo.com
  Providenza & Boekelheide, Inc.



More information about the Python-list mailing list