From the tests:
from OpenSSL import SSL
Response to the edit: pip install pyopenssl should have installed six. If you're trying to install yourself, I'd not do this, but you can install the dependencies manually using pip install six cryptography and then your import should work fine. If not, leave a comment and I'll do some further investigation.
Response to comment: There are instructions on installing pip on windows.
Answer from hd1 on Stack Overflow
» pip install pyOpenSSL
Videos
From the tests:
from OpenSSL import SSL
Response to the edit: pip install pyopenssl should have installed six. If you're trying to install yourself, I'd not do this, but you can install the dependencies manually using pip install six cryptography and then your import should work fine. If not, leave a comment and I'll do some further investigation.
Response to comment: There are instructions on installing pip on windows.
Both these forms works.
import OpenSSL.SSL # or
from OpenSSL import SSL
You can also install using conda.
Please be aware that there are two python packages of similar names: openssl and pyopenssl.
- Both has the same import name OpenSSL
- Both are being used by many other packages. So it is not one supersede the other. Both are needed in general.
- Install pyopenssl looks like will install openssl too.
- For example, python itself uses openssl, while conda uses pyopenssl.
Here are the code snipes to see:
conda create -n x1 python=3.8
conda list -n x1 | grep openssl # will see openssl