获取错误:DLL 加载失败:操作系统无法运行 %1 - Python 2.7;Scrapy 模块;导入密码术 [英] Getting error: DLL load failed: The operating system cannot run %1 - Python 2.7; Scrapy Module; Importing Cryptography
问题描述
我无法成功运行 Scrapy 教程 (http://doc.scrapy.org/en/latest/intro/tutorial.html)
中的第一个命令.下面粘贴的代码副本是结果(最后是错误).
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 at the end).
Python 2.7 已安装,我按照scrapy (http://doc.scrapy.org/en/latest/intro/install.html)
.我在 Windows 7(64 位)上运行 Python 2.7.6 32 位.
Python 2.7 is installed, and I followed the installation instructions for scrapy (http://doc.scrapy.org/en/latest/intro/install.html)
. I am running Python 2.7.6 32 bit on Windows 7 (64 bit).
安装的其他方面:
Twisted-13.2.0.dist-info
zope.interface-4.1.1-py2.7
Scrapy-0.22.2-py2.7
lxml-3.3.3-py2.7
cssselect-0.9.1-py2.7
cryptography-0.3.dist-info
pyOpenSSL-0.14-py2.7
pywin32_system32
这是错误信息:
C:Python27Scripts>scrapy startproject tutorial
Traceback (most recent call last):
File "C:Python27lib
unpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "C:Python27lib
unpy.py", line 72, in _run_code
exec code in run_globals
File "C:Python27libsite-packagesscrapycmdline.py", line 9, in <module>
from scrapy.crawler import CrawlerProcess
File "C:Python27libsite-packagesscrapycrawler.py", line 3, in <module>
from twisted.internet import reactor, defer
File "twistedinternet
eactor.py", line 38, in <module>
from twisted.internet import default
File "twistedinternetdefault.py", line 56, in <module>
install = _getInstallFunction(platform)
File "twistedinternetdefault.py", line 50, in _getInstallFunction
from twisted.internet.selectreactor import install
File "twistedinternetselectreactor.py", line 18, in <module>
from twisted.internet import posixbase
File "twistedinternetposixbase.py", line 24, in <module>
from twisted.internet import error, udp, tcp
File "twistedinternet cp.py", line 29, in <module>
from twisted.internet._newtls import (
File "twistedinternet\_newtls.py", line 21, in <module>
from twisted.protocols.tls import TLSMemoryBIOFactory, TLSMemoryBIOProtocol
File "twistedprotocols ls.py", line 40, in <module>
from OpenSSL.SSL import Error, ZeroReturnError, WantReadError
File "builddist.win32eggOpenSSL\__init__.py", line 8, in <module>
File "builddist.win32eggOpenSSL
and.py", line 11, in <module>
File "builddist.win32eggOpenSSL\_util.py", line 4, in <module>
File "C:Python27libsite-packagescryptographyhazmatindingsopensslinding.py", l3, in __init__
self._ensure_ffi_initialized()
File "C:Python27libsite-packagescryptographyhazmatindingsopensslinding.py", l9, in _ensure_ffi_initialized libraries)
File "C:Python27libsite-packagescryptographyhazmatindingsutils.py", line 77, ind_ffi
ext_package="cryptography",
File "C:Python27libsite-packagescffiapi.py", line 341, in verify
lib = self.verifier.load_library()
File "C:Python27libsite-packagescffiverifier.py", line 75, in load_library
return self._load_library()
File "C:Python27libsite-packagescffiverifier.py", line 151, in _load_library
return self._vengine.load_library()
File "C:Python27libsite-packagescffivengine_cpy.py", line 138, in load_library
raise ffiplatform.VerificationError(error)
cffi.ffiplatform.VerificationError: importing 'C:\Python27\lib\site-packages\cryptogr
\_Cryptography_cffi_48bbf0ebx93c91939.pyd': DLL load failed: The operating system cannot
1.**
推荐答案
我只是重新安装密码学以使其工作.
I just reinstall cryptography to make it work.
pip 卸载密码
pip 安装密码
这篇关于获取错误:DLL 加载失败:操作系统无法运行 %1 - Python 2.7;Scrapy 模块;导入密码术的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!