How to install libffi-dev and libssl-dev on Windows

A. A. Pedersen picture A. A. Pedersen · Dec 4, 2018 · Viewed 8.8k times · Source

I am trying to run a piece of code using paramiko, but I get the error message ImportError: No module named cryptography.hazmat.backends. Both paramiko and cryptography are already installed.

As far as I can read on various forums, I need to install libffi-dev (and maybe also libssl-dev). However, all solutions I can find are either for Ubuntu or Mac OS. How do I install them on Windows 10?

Answer

A. A. Pedersen picture A. A. Pedersen · Dec 7, 2018

Solved the issue by running

pip install cryptography --force-reinstall

and

pip install paramiko --force-reinstall