ImportError: No module named rand

Asked by Michel Lundell on 2010-10-20

When trying to use the pyOpenSSL module I get the following error:

C:\test>ipy SimpleSecureHTTPSServer.py
Traceback (most recent call last):
  File "SimpleSecureHTTPSServer.py", line 5, in SimpleSecureHTTPSServer.py
  File "C:\Program Files\IronPython 2.6\lib\site-packages\OpenSSL\__init__.py",
line 11, in C:\Program Files\IronPython 2.6\lib\site-packages\OpenSSL\__init__.py
ImportError: No module named rand
C:\test>

The SimpleSecureHTTPSServer.py looks like

import socket, os
from SocketServer import BaseServer
from BaseHTTPServer import HTTPServer
from SimpleHTTPServer import SimpleHTTPRequestHandler
from OpenSSL import SSL

.... etc

Have I missed something in the installation ...

Regards Michel

Question information

Language:
English Edit question
Status:
Answered
For:
pyOpenSSL Edit question
Assignee:
No assignee Edit question
Last query:
2010-10-20
Last reply:
2010-11-01
Jean-Paul Calderone (exarkun) said : #1

pyOpenSSL primarily provides three extension modules which wrap OpenSSL APIs. You'll need to figure out how to make IronPython load CPython extension modules if you want to use pyOpenSSL on it. I believe it's not necessarily out of the question - there's something called IronClad for IronPython which may help - but I haven't tried this myself, and IronPython isn't "officially" supported by pyOpenSSL.

Can you help with this problem?

Provide an answer of your own, or ask Michel Lundell for more information if necessary.

To post a message you must log in.