Problems importing anything using _socket

Hugh h.e.w.frater at cs.cf.ac.uk
Tue Mar 5 06:35:58 EST 2002


Hi all,
 I'm totally new to python, but have decided to use it to do a first
year uni project. I've got to develop a web based library. I'm using
oracle with the DCOracle2 module, and that works fine. But I can't
import anything that uses _socket. If I try and do an "import cgi"
frok inside the interpreter, I get this message:
>>> import cgi
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/local/lib/python2.2/cgi.py", line 39, in ?
    import urllib
  File "/usr/local/lib/python2.2/urllib.py", line 26, in ?
    import socket
  File "/usr/local/lib/python2.2/socket.py", line 41, in ?
    from _socket import *
ImportError: No module named _socket
>>> import cgi
>>> 

However, As you can see from above If I then type and run the line
"import cgi" again, it forks fine. Any ideas?
Thanks
Hugh
(Cardiff, UK)



More information about the Python-list mailing list