3

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 ??

Elteroooo
  • 2,913
  • 3
  • 33
  • 40

2 Answers2

2

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.

Olson
  • 1,884
  • 2
  • 17
  • 18
  • I had the same problem but it was because I did not have the Win32 OpenSSL DLLs installed to the system dir. I had them installed to the bin dir instead. I just added the bin dir to my path and everything worked! – Devin May 21 '13 at 19:57
0

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 enter image description here

LeXIkA333
  • 11
  • 2