I am trying to generate executable(x86) with pyinstaller(3.0) on windows7(x64). I have installed cffi and other needed packages with pip. I can import cffi and _cffi_backend module successfully from command line:
>>> import cffi
>>> import _cffi_backend
>>> cffi.__file__
'C:\\Program Files (x86)\\Python27\\lib\\site-packages\\cffi\\__init__.pyc'
>>> _cffi_backend.__file__
'C:\\Program Files (x86)\\Python27\\lib\\site-packages\\_cffi_backend.pyd'
>
While trying to run generated executable I got error below:
File "C:\Program Files (x86)\Python27\lib\site-packages\cryptography\hazmat\bindings\openssl\binding.py", line 13, in <module>
from cryptography.hazmat.bindings._openssl import ffi, lib
File "c:\program files (x86)\python27\lib\site-packages\PyInstaller-3.0-py2.7.egg\PyInstaller\loader\pyimod03_importers.py", line 517, in load_module
module = imp.load_module(fullname, fp, filename, ext_tuple)
ImportError: No module named _cffi_backend
You may see full startup log here.
By the way, I have compiled libcffi library with mingw and got a DLL file. Then copied to one of the library path and I got same error on application startup again.
I do not know why _cffi_backend library could not be loaded on application startup even it exists and in python path. I am not good at python and unfortunately I am stuck on this almost 2 days, any suggestion and guidence will be appreciated.
Thanks.