Skip to content Skip to sidebar Skip to footer

Getting Error: DLL Load Failed: The Operating System Cannot Run %1 - Python 2.7; Scrapy Module; Importing Cryptography

I cannot successfully run the first command in the Scrapy tutorial (http://doc.scrapy.org/en/latest/intro/tutorial.html). The code copy pasted below is the result (with the error

Solution 1:

I just reinstall cryptography to make it work.

pip uninstall cryptography

pip install cryptography


Solution 2:

I had this problem due to another (older?) version of libeay32.dll and ssleay32.dll being on the PATH before those of my own OpenSSL 1.0.1g installation. I recommend you use Process Monitor from SysInternals to monitor python.exe to see where it is actually loading your OpenSSL DLLs from.

In my case, the offender was some Intel components at C:\Program Files (x86)\Intel\iCLS Client\ that came with my drivers. After moving my own OpenSSL bin directory earlier in the PATH environment variable, everything worked as expected.


Solution 3:

this is due to _Cryptography_cffi_48bbf0ebx93c91939.pyd depends on openssl dll ssleay32.dll and libeay32.dll. after you compile openssl on windows, u can copy these 2 files to system32.


Solution 4:

@crazyzh1984's method is a little complex, but his supplement that posted at the bottom of his answer is very useful. I download the "Win32 OpenSSL v1.0.1g Light" at http://slproweb.com/products/Win32OpenSSL.html and then I could install pyOpenSSL successfully.


Solution 5:

@lambokini is right,but i'cant comment on the answer, so come this one.

First download openssl source from http://www.openssl.org/

Second start "Visual Studio Command Prompt", compile and install openssl follow install guide(INSTALL.W32 or INSTALL.W64).

Then add "[openssl install path]\bin" to the environment variable "path", and you can delete ssleay32.dll and libeay32.dll under system32.

Notice: dll will be load from the first place it seached. for exmple: Path=xxx;d:\PHP5;d:\openssl\bin; if ssleay32.dll and libeay32.dll also appears under PHP5, then python will load that one.


Post a Comment for "Getting Error: DLL Load Failed: The Operating System Cannot Run %1 - Python 2.7; Scrapy Module; Importing Cryptography"