我有一个使用tkinter和Pandas的工作项目,但是每当我尝试使用Pyinstaller导出它时,当我将Pandas导入到我的项目时,它将显示一个错误。
57986 WARNING: Cannot read QLibraryInfo output: raised Expecting value: line 1 column 1 (char 0) when decoding:
Traceback (most recent call last):
File "<string>", line 11, in <module>
ImportError: DLL load failed: The specified procedure could not be found.
Traceback (most recent call last):
File "c:\python36\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\python36\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Python36\Scripts\pyinstaller.exe\__main__.py", line 9, in <module>
File "c:\python36\lib\site-packages\PyInstaller\__main__.py", line 111, in run
run_build(pyi_config, spec_file, **vars(args))
File "c:\python36\lib\site-packages\PyInstaller\__main__.py", line 63, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "c:\python36\lib\site-packages\PyInstaller\building\build_main.py", line 838, in main
build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
File "c:\python36\lib\site-packages\PyInstaller\building\build_main.py", line 784, in build
exec(text, spec_namespace)
File "<string>", line 17, in <module>
File "c:\python36\lib\site-packages\PyInstaller\building\build_main.py", line 241, in __init__
self.__postinit__()
File "c:\python36\lib\site-packages\PyInstaller\building\datastruct.py", line 158, in __postinit__
self.assemble()
File "c:\python36\lib\site-packages\PyInstaller\building\build_main.py", line 500, in assemble
module_hook.post_graph()
File "c:\python36\lib\site-packages\PyInstaller\building\imphook.py", line 410, in post_graph
self._load_hook_module()
File "c:\python36\lib\site-packages\PyInstaller\building\imphook.py", line 377, in _load_hook_module
self.hook_module_name, self.hook_filename)
File "c:\python36\lib\site-packages\PyInstaller\compat.py", line 736, in importlib_load_source
return mod_loader.load_module()
File "<frozen importlib._bootstrap_external>", line 399, in _check_name_wrapper
File "<frozen importlib._bootstrap_external>", line 823, in load_module
File "<frozen importlib._bootstrap_external>", line 682, in load_module
File "<frozen importlib._bootstrap>", line 265, in _load_module_shim
File "<frozen importlib._bootstrap>", line 684, in _load
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "c:\python36\lib\site-packages\PyInstaller\hooks\hook-PyQt5.py", line 23, in <module>
collect_system_data_files(pyqt5_library_info.location['PrefixPath'],
File "c:\python36\lib\site-packages\PyInstaller\utils\hooks\qt.py", line 67, in __getattr__
qli = json.loads(json_str)
File "c:\python36\lib\json\__init__.py", line 354, in loads
return _default_decoder.decode(s)
File "c:\python36\lib\json\decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "c:\python36\lib\json\decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
这是我的Firstime导出到exe。我已经重新安装了pyinstaller pyqt5,pandas,但仍然没有。 我正在使用
库:熊猫,pyinstaller。
答案 0 :(得分:0)
collect_system_data_files(pyqt5_library_info.location['PrefixPath']
这表明收集系统数据文件时开始出现错误。尝试安装PyQt5,然后运行PyInstaller。
答案 1 :(得分:0)
我有同样的问题。经过数小时的混乱之后,我相信删除了我计算机上的旧版本的python可以解决此问题,尽管我不确定,因为我做了很多事情。我建议尝试尝试卸载其他版本的python(如果有),然后通过pip卸载并重新安装程序的依赖项。然后,确保您能够从cmd:myProgram.py
运行python脚本C:\<path to the location of myProgram>\>python myProgram.py
。解决尝试使用pyinstaller之前可能发生的任何错误,这对我来说解决了这个特定错误。