这是我的第一个问题
我在我的python(3.7.4)脚本中使用了pyexcel,并且它运行得很好。
然而,在使用Pyinstaller创建exe文件之后,我的exe文件无法运行,因为它不是.py文件。
以下是程序运行时出现的错误: (当我运行.py脚本时,这些问题没有出现)
以下是程序运行时出现的错误: (当我运行.py脚本时,这些问题没有出现)
File "site-packages\pyexcel\core.py", line 110, in save_book_as
File "site-packages\pyexcel\internal\core.py", line 39, in get_book_stream
File "site-packages\pyexcel\plugins\sources\file_input.py", line 39, in get_data
File "site-packages\pyexcel\plugins\parsers\excel.py", line 19, in parse_file
File "site-packages\pyexcel\plugins\parsers\excel.py", line 40, in _parse_any
File "site-packages\pyexcel_io\io.py", line 73, in get_data
File "site-packages\pyexcel_io\io.py", line 91, in _get_data
File "site-packages\pyexcel_io\io.py", line 190, in load_data
File "site-packages\pyexcel_io\plugins.py", line 90, in get_a_plugin
File "site-packages\lml\plugin.py", line 290, in load_me_now
File "site-packages\pyexcel_io\plugins.py", line 107, in raise_exception
pyexcel_io.exceptions.SupportingPluginAvailableButNotInstalled: Please install pyexcel-xls
我已经完成了所有隐藏的导入,按照https://pyexcel-io.readthedocs.io/en/latest/pyinstaller.html和https://pyexcel.readthedocs.io/en/latest/pyinstaller.html的说明。
这是我通过命令提示符使用的隐藏导入脚本。
--hidden-import pyexcel.plugins.renderers.sqlalchemy --hidden-import pyexcel.plugins.renderers.django --hidden-import pyexcel.plugins.renderers.excel --hidden-import pyexcel.plugins.renderers._texttable --hidden-import pyexcel.plugins.parsers.excel --hidden-import pyexcel.plugins.parsers.sqlalchemy --hidden-import pyexcel.plugins.sources.http --hidden-import pyexcel.plugins.sources.file_input --hidden-import pyexcel.plugins.sources.memory_input --hidden-import pyexcel.plugins.sources.file_output --hidden-import pyexcel.plugins.sources.output_to_memory --hidden-import pyexcel.plugins.sources.pydata.bookdict --hidden-import pyexcel.plugins.sources.pydata.dictsource --hidden-import pyexcel.plugins.sources.pydata.arraysource --hidden-import pyexcel.plugins.sources.pydata.records --hidden-import pyexcel.plugins.sources.django --hidden-import pyexcel.plugins.sources.sqlalchemy --hidden-import pyexcel.plugins.sources.querysets --hidden-import pyexcel_io.readers.csvr --hidden-import pyexcel_io.readers.csvz --hidden-import pyexcel_io.readers.tsv --hidden-import pyexcel_io.readers.tsvz --hidden-import pyexcel_io.writers.csvw --hidden-import pyexcel_io.readers.csvz --hidden-import pyexcel_io.readers.tsv --hidden-import pyexcel_io.readers.tsvz --hidden-import pyexcel_io.database.importers.django --hidden-import pyexcel_io.database.importers.sqlalchemy --hidden-import pyexcel_io.database.exporters.django --hidden-import pyexcel_io.database.exporters.sqlalchemy --hidden-import pyexcel_xls --hidden-import pyexcel_xls.xls --hidden-import pyexcel_xls.xlsr --hidden-import pyexcel_xls.xlsw
同时我已安装了以下内容。
pyexcel==0.5.15
pyexcel-io==0.5.20
**pyexcel-xls==0.5.8**
pyexcel-xlsx==0.5.8
PyInstaller==4.0.dev0+55c8855d9d
感谢每一个评论和答案!
附注:我已经安装了pyexcel-xls==0.5.8并添加了--hidden-import pyexcel_xls.xls
更新:exe文件仍然存在相同的问题。我应该发布Pyinstaller日志或我的Python脚本中导入的一些库吗?
pyexcel.ext.xlsx
和pyexcel.ext.xls
。 - I_Al-thamary