首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >ubuntu上的Pyinstaller抛出异常PyInstaller.compat.FileNotFoundError

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

Stack Overflow用户
提问于 2015-10-23 21:37:18
回答 1查看 1.5K关注 0票数 4

正在运行

代码语言:javascript
复制
pyinstaller myfile.spec

Tracebacok

代码语言:javascript
复制
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.
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-10-23 21:37:18

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

代码语言:javascript
复制
apt install build-essential python-dev
票数 8
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/33311758

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档