Python M2Crypto DLL 加载失败,找不到指定的模块
我正在尝试将此切片用于我的 web2py 应用程序 http://www.web2pyslices.com/slices/take_slice/106
我安装了该模块M2Crypto 并跟随切片,加载页面时收到此错误,
Traceback (most recent call last):
File "F:\Projects\Web2py\w1992\gluon\restricted.py", line 194, in restricted
exec ccode in environment
File "F:\Projects\Web2py\w1992\applications\internet2letter\views\account/order.html", line 102, in <module>
File "F:\Projects\Web2py\w1992\gluon\custom_import.py", line 294, in __call__
fromlist, level)
File "F:\Projects\Web2py\w1992\gluon\custom_import.py", line 78, in __call__
level)
File "applications\internet2letter\modules\crypt.py", line 2, in <module>
from M2Crypto import BIO, SMIME, X509, EVP
File "F:\Projects\Web2py\w1992\gluon\custom_import.py", line 294, in __call__
fromlist, level)
File "F:\Projects\Web2py\w1992\gluon\custom_import.py", line 78, in __call__
level)
File "C:\Python27\lib\site-packages\M2Crypto\__init__.py", line 22, in <module>
import __m2crypto
File "F:\Projects\Web2py\w1992\gluon\custom_import.py", line 294, in __call__
fromlist, level)
File "F:\Projects\Web2py\w1992\gluon\custom_import.py", line 78, in __call__
level)
ImportError: DLL load failed: Das angegebene Modul wurde nicht gefunden.
因此我尝试直接从 Python 导入模块 我打开终端并
>>> import M2Crypto
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python27\lib\site-packages\M2Crypto\__init__.py", line 23, in <module
>
import m2
File "C:\Python27\lib\site-packages\M2Crypto\m2.py", line 28, in <module>
from __m2crypto import *
ImportError: DLL load failed: Das angegebene Modul wurde nicht gefunden.
>>>
无论如何解决这个问题?
I'm trying to use this slice for my web2py app
http://www.web2pyslices.com/slices/take_slice/106
i installed the module M2Crypto and followed the slice, when loading the page i receive this error
Traceback (most recent call last):
File "F:\Projects\Web2py\w1992\gluon\restricted.py", line 194, in restricted
exec ccode in environment
File "F:\Projects\Web2py\w1992\applications\internet2letter\views\account/order.html", line 102, in <module>
File "F:\Projects\Web2py\w1992\gluon\custom_import.py", line 294, in __call__
fromlist, level)
File "F:\Projects\Web2py\w1992\gluon\custom_import.py", line 78, in __call__
level)
File "applications\internet2letter\modules\crypt.py", line 2, in <module>
from M2Crypto import BIO, SMIME, X509, EVP
File "F:\Projects\Web2py\w1992\gluon\custom_import.py", line 294, in __call__
fromlist, level)
File "F:\Projects\Web2py\w1992\gluon\custom_import.py", line 78, in __call__
level)
File "C:\Python27\lib\site-packages\M2Crypto\__init__.py", line 22, in <module>
import __m2crypto
File "F:\Projects\Web2py\w1992\gluon\custom_import.py", line 294, in __call__
fromlist, level)
File "F:\Projects\Web2py\w1992\gluon\custom_import.py", line 78, in __call__
level)
ImportError: DLL load failed: Das angegebene Modul wurde nicht gefunden.
so i tried to import the module from Python direcktly
i opened the terminal and put
>>> import M2Crypto
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python27\lib\site-packages\M2Crypto\__init__.py", line 23, in <module
>
import m2
File "C:\Python27\lib\site-packages\M2Crypto\m2.py", line 28, in <module>
from __m2crypto import *
ImportError: DLL load failed: Das angegebene Modul wurde nicht gefunden.
>>>
anyway to solve this ??
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
遇到了同样的问题,通过从此处安装适用于 Windows 的 OpenSSL 来修复它: http://slproweb.com/products/ Win32OpenSSL.html
我将 OpenSSL v1.0.1b(DLL 安装到系统目录)与 M2Crypto 0.21.1 和 Python 2.7.3(所有 32版本)没问题。
Had the same problem, fixed it by installing OpenSSL for Windows from here: http://slproweb.com/products/Win32OpenSSL.html
I used OpenSSL v1.0.1b (DLLs installed to system dir) with M2Crypto 0.21.1 and Python 2.7.3 (all 32 versions) no problem.
已解决:
为了使用与 python 2.7 兼容的模块并避免帖子中指出的错误,需要有以下 Microsoft Visual Studio 库(列出的所有 MV C++ 版本):
从 2008 年到 2022 年 + 包括 2010 年工具(也列出) + 适用于 Py 2.7 的 Microsoft Visual C++ 编译器包
Solved:
In order to use modules that are compatible with python 2.7 and to avoid the Error indicated in the post, it is necessary to have the following Microsofot Visual Studio libraries (all MV C++ version that are listed):
from 2008- 2022 + including the 2010 tools (also listed) + Microsoft Visual C++ Compiler Package for Py 2.7