简体   繁体   English

ImportError:DLL加载失败:操作系统无法运行%1。 Python 2.7.12 | Anaconda 4.2.0(64位)

[英]ImportError: DLL load failed: The operating system cannot run %1. Python 2.7.12 |Anaconda 4.2.0 (64-bit)

My Operating System is Win10-x64. 我的操作系统是Win10-x64。

I run scrapy command: scrapy startproject tutorial in MS-DOS window then get the following error message: 我在MS-DOS窗口中运行scrapy命令: scrapy startproject tutorial然后得到以下错误消息:

图片1

I am sure i have installed scrapy, but any scrapy command is not working. 我确信我已经安装了scrapy,但是任何scrapy命令都无法正常工作。

I notice the log: " from cryptography.hazmat.bindings._openssl import ffi, lib " and i seach the file cryptography.hazmat.bindings._openssl found it _openssl is a .pyd file. 我注意到日志:“ 来自cryptography.hazmat.bindings._openssl import ffi,lib ”,我发现文件cryptography.hazmat.bindings._openssl发现它_openssl是一个.pyd文件。

图2

it seems there is some error exist in this file. 看来这个文件中存在一些错误。

I also notice that the OpenSSL package in Anaconda was built with vc9, I install the micro runtime environment and it didn't help me. 我还注意到Anaconda中的OpenSSL包是用vc9构建的,我安装了微运行时环境,它对我没有帮助。

Try using the conda-forge channel which contains up to date packages. 尝试使用包含最新包的conda-forge通道。

conda install scrapy -c conda-forge

Note: Use a new environment as it's likely you installed cryptography (and possibly lxml ) via pip , and that may not play well with a conda environments. 注意:使用新环境,因为您可能通过pip安装了cryptography (可能还有lxml ),这可能不适合conda环境。

name = scrapy or cryptography name = scrapy或cryptography

Just pip uninstall "name" as its likely for conda to tell you some of the uninstall cannot be done due to dependencies. 只需点击pip uninstall "name"因为它可能会让conda告诉你由于依赖性而无法完成某些卸载。

Thereafter pip install "name" 此后pip install "name"

Problem is likely to be solved by now. 问题很可能现在已经解决了。

I Build OpenSSL WIN64 release version with Visual studio 2015, and replace libeay32.dll and ssleay32.dll to "C:\\Windows\\System32", then scrapy command work. 我使用Visual Studio 2015构建OpenSSL WIN64版本,并将libeay32.dll和ssleay32.dll替换为“C:\\ Windows \\ System32”,然后scrapy命令工作。 it also said that built a WIN32 version is better, but i didn't try. 它还说建立一个WIN32版本更好,但我没试过。 I built dynamic libraries, not static libraries. 我构建了动态库,而不是静态库。 Build Command for anyone interest: 为任何兴趣的人建立命令:

cd C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin
vcvars64.bat
perl Configure VC-WIN64A no-asm --prefix="c:\openssl-1.0.2j\build-vc14-debug-win64-dll"
ms\do_win64a.bat
nmake -f ms\ntdll.mak
nmake -f ms\ntdll.mak test
nmake -f ms\ntdll.mak install
nmake -f ms\ntdll.mak clean

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 导入cv2:ImportError:DLL加载失败:Windows 7 Anaconda 4.3.0(64位)Python 3.6.0 - Import cv2: ImportError: DLL load failed: windows 7 Anaconda 4.3.0 (64-bit) Python 3.6.0 paramiko ImportError:DLL加载失败:操作系统无法运行%1 - paramiko ImportError: DLL load failed: The operating system cannot run %1 psycopg2 - 导入错误:DLL 导入 _psycopg 时加载失败:操作系统无法运行 %1 - psycopg2 - ImportError: DLL load failed while importing _psycopg: The operating system cannot run %1 Python pylab ImportError:DLL加载失败Windows 7 64位 - Python pylab ImportError: DLL load failed Windows 7 64 Bit Python 3.5、OpenCV 3.2、Windows 7 64 位、Anaconda 3、“导入错误:DLL 加载失败” - Python 3.5, OpenCV 3.2, Windows 7 64-bits, Anaconda 3, “ImportError: DLL load failed” Windows7 64-bit, Pyside6, PyQt6, ImportError: DLL load failed while importing QtCore: The specified procedure could not be found - Windows7 64-bit, Pyside6, PyQt6, ImportError: DLL load failed while importing QtCore: The specified procedure could not be found 64位cx_Oracle:DLL加载失败 - 64-bit cx_Oracle: DLL load failed Windows 10,Python 3.6和64位上的Tensorflow的DLL加载失败 - DLL load failed for Tensorflow on Windows 10, Python 3.6 and 64-bit Anaconda Python 32位正在尝试加载Anaconda 64位库 - Anaconda Python 32-bit is trying to load Anaconda 64-bit libraries win10 pro 64 bit + python 3.6.0 ImportError: DLL load failed: The specified module could not be found - win10 pro 64 bit + python 3.6.0 ImportError: DLL load failed: The specified module could not be found
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM