ImportError: No module named OpenSSL (python 2.7, windows 8.1)

I have installed pyOpenSSL and all the required packages, but I cannot import OpenSSL into the wrapper. I am getting this error:

>>> import OpenSSL
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named OpenSSL


list of required packages that are already installed:

cryptography (0.9.3)
distribute (0.7.3)
idna (2.0)
pip (7.1.0)
pyasn1 (0.1.8)
pyasn1-modules (0.0.5)
pyopenssl (0.15.1)
requests (2.7.0)
service-identity (14.0.0)
setuptools (18.1)
six (1.9.0)
Twisted (15.2.1)
urllib3 (1.11)
w3lib (1.12.0)
zope.interface (4.1.2)



source to share

1 answer

If you are using 64-bit Windows, I recommend that you install the Win64 version of OpenSSL available from (scroll down until you find 64-bit installers) and 64 -bit version of pyOpenSSL available from

Make sure you don't have 32-bit versions of various products, python packages, etc. I had some site packages on PYTHONPATH that confused python. I removed the environment variable PYTHONPATH and similarly PYTHONUSERBASE (both were recommended by some software where I tried to use 32 bit versions of mitmproxy and everything else works back ...) I want to keep my 64 bit version of Python (2.7.6). hence my struggle when I ran into the same error you reported here.



All Articles