Dec-16-2020, 05:52 AM
Hello,
I have problem with compiling application by py2exe.
Application uses Crypto libs (pycryptodome). My setup.py
Any idea? Problem dont occur if i use bundle_file=3 and files arent packed to exe or lib file (when i use zip option).
Best regards,
I have problem with compiling application by py2exe.
Application uses Crypto libs (pycryptodome). My setup.py
from distutils.core import setup import py2exe setup( options = {'py2exe': {'compressed': True, 'bundle_files': 0, 'excludes': ['tcl', 'tkinter'], 'packages': ['Crypto'], }}, windows=[{'script':'test.py'}], zipfile = None, #"lib/shared.lib", )But when i want start app i get errors like
Error:Traceback (most recent call last):
File "test.py", line 9, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "zipextimporter.pyc", line 87, in load_module
File "Crypto\Cipher\__init__.pyc", line 27, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "zipextimporter.pyc", line 87, in load_module
File "Crypto\Cipher\_mode_ecb.pyc", line 47, in <module>
File "Crypto\Util\_raw_api.pyc", line 308, in load_pycryptodome_raw_lib
OSError: Cannot load native module 'Crypto.Cipher._raw_ecb': Trying '_raw_ecb.cp37-win_amd64.pyd': cannot load library 'C:\xxx\test.exe\Crypto\Util\..\Cipher\_raw_ecb.cp37-win_amd64.pyd': error 0x7e. Additionally, ctypes.util.find_library() did not manage to locate a library called 'C:\\xxx\\test.exe\\Crypto\\Util\\..\\Cipher\\_raw_ecb.cp37-win_amd64.pyd', Trying '_raw_ecb.pyd': cannot load library 'C:\xxx\test.exe\Crypto\Util\..\Cipher\_raw_ecb.pyd': error 0x7e. Additionally, ctypes.util.find_library() did not manage to locate a library called 'C:\\xxx\\test.exe\\Crypto\\Util\\..\\Cipher\\_raw_ecb.pyd'
I checked, path are right and file exist(for example file name is _raw_ecb.pyd).Any idea? Problem dont occur if i use bundle_file=3 and files arent packed to exe or lib file (when i use zip option).
Best regards,