Hi,
I use pyinstaller to compile the python script to exe file in centos7
system that contained the following line :
from CaChannel import ca, CaChannel
When executing the exe file and an error occured :
[user@localhost dist]$ ./1-ok
/tmp/_MEIxRN9gA/CaChannel/ca.py:13: RuntimeWarning: c extension is not
available, trying caffi as fallback
Traceback (most recent call last):
File "1-ok.py", line 4, in <module>
File
"/usr/lib/python2.7/site-packages/PyInstaller/loader/pyimod03_importers.py",
line 396, in load_module
exec(bytecode, module.__dict__)
File "CaChannel/__init__.py", line 3, in <module>
File
"/usr/lib/python2.7/site-packages/PyInstaller/loader/pyimod03_importers.py",
line 396, in load_module
exec(bytecode, module.__dict__)
File "CaChannel/CaChannel.py", line 15, in <module>
File
"/usr/lib/python2.7/site-packages/PyInstaller/loader/pyimod03_importers.py",
line 396, in load_module
exec(bytecode, module.__dict__)
File "CaChannel/ca.py", line 14, in <module>
ImportError: No module named caffi.ca
[26510] Failed to execute script 1-ok
It seems I have to enter the absoult path of caffi.ca when using
pyinstaller.
I have installed the cachannel by using the command:
sudo easy_install cachannel
I have no idea what the path of caffi.ca is under centos7 system or
other methods to solve the problem.
Any help will be appreciated and thanks in advance!
Zhefu