gpt4 book ai didi

ubuntu 上的 Pyinstaller 抛出异常 PyInstaller.compat.FileNotFoundError

转载 作者:行者123 更新时间:2023-12-04 23:18:42 55 4
gpt4 key购买 nike

运行

pyinstaller myfile.spec

下面的回溯
Traceback (most recent call last):
File "/usr/local/bin/pyinstaller", line 9, in <module>
load_entry_point('PyInstaller==3.0', 'console_scripts', 'pyinstaller')()
File "/usr/local/lib/python2.7/dist-packages/PyInstaller/__main__.py", line 99, in run
run_build(opts, spec_file, pyi_config)
File "/usr/local/lib/python2.7/dist-packages/PyInstaller/__main__.py", line 47, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **opts.__dict__)
File "/usr/local/lib/python2.7/dist-packages/PyInstaller/building/build_main.py", line 737, in main
build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
File "/usr/local/lib/python2.7/dist-packages/PyInstaller/building/build_main.py", line 680, in build
exec(text, spec_namespace)
File "<string>", line 6, in <module>
File "/usr/local/lib/python2.7/dist-packages/PyInstaller/building/build_main.py", line 207, in __init__
self.__postinit__()
File "/usr/local/lib/python2.7/dist-packages/PyInstaller/building/datastruct.py", line 156, in __postinit__
self.assemble()
File "/usr/local/lib/python2.7/dist-packages/PyInstaller/building/build_main.py", line 430, in assemble
imphook_object.update_dependencies(self.graph)
File "/usr/local/lib/python2.7/dist-packages/PyInstaller/building/imphook.py", line 345, in update_dependencies
self._process_datas(mod_graph)
File "/usr/local/lib/python2.7/dist-packages/PyInstaller/building/imphook.py", line 313, in _process_datas
self.datas.update(set(format_binaries_and_datas(self._module.datas)))
File "/usr/local/lib/python2.7/dist-packages/PyInstaller/building/utils.py", line 422, in format_binaries_and_datas
src_root_path_or_glob))
PyInstaller.compat.FileNotFoundError: Path or glob "/usr/include/python2.7/pyconfig.h" not found or matches no files.

最佳答案

Pyinstaller 需要一个 Ubuntu 包,因为它有几个依赖项。这没有记录,但您需要 python-dev :

apt install build-essential python-dev

关于ubuntu 上的 Pyinstaller 抛出异常 PyInstaller.compat.FileNotFoundError,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33311758/

55 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com