ImportError: No module named 'pyexcel_xls.xls'
TerryBryant opened this issue · 4 comments
Hello, after I packaged my '.py' file into '.exe' file using pyinstaller and run the '.exe' file, it goes wrong and prints something as follows:
File "site-packages\pyexcel_xls_init_.py", line 36, in save_data
File "site-packages\pyexcel_io\io.py", line 104, in store_data
File "site-packages\pyexcel_io\io.py", line 167, in get_writer
File "site-packages\pyexcel_io\manager.py", line 217, in create_writer
File "site-packages\pyexcel_io\manager.py", line 241, in _preload_a_handler
File "site-packages\pyexcel_io\manager.py", line 97, in dynamic_load_library
ImportError: No module named 'pyexcel_xls.xls'
My code are as follows:
from pyexcel_xls import save_data
save_data(m_str, data)
My environment is python3.5 + pyexcel-io-0.3.4 + pyinstaller-3.2.1
What should I do? Thanks!
Have you tried according to the special note yet?
Yesssssssssssssss! Thank you so much, the correct package command is:
pyinstaller -F xx.py --hidden-import pyexcel_xls --hidden-import pyexcel_xls.xls
For your information, pyexcel-xls v0.4.0 has splited xls into two xlsr and xlsw so you will need to these statement instead:--hidden-import pyexcel_xls.xlsr --hidden-import pyexcel_xls.xlsw
Since pyexcel-io 0.4.0, the instructions for pyinstaller have been updated http://pyexcel-io.readthedocs.io/en/latest/pyinstaller.html