这是我在 python(3.7.4) 脚本中使用pyexcel的第一个问题,它运行良好。但是,使用Pyinstaller创建 exe 文件后,我的 exe 文件无法像 .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
感谢您的每一个评论和回答!!
PS。我已经安装了pyexcel-xls==0.5.8并添加了 --hidden-import pyexcel_xls.xls
更新:exe。仍然有同样的问题。我应该在我的 Python 脚本中发布 Pyinstaller 的日志或我导入的一些库吗?