首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用OpenCV和VPython的python脚本出现PyInstaller错误(找不到DOS头)

使用OpenCV和VPython的python脚本出现PyInstaller错误(找不到DOS头)
EN

Stack Overflow用户
提问于 2017-05-12 23:52:25
回答 1查看 1.6K关注 0票数 0

我正在尝试从使用openCV和Vpython的脚本生成可执行文件,但是我遇到了问题。我试着用一个简单的打印脚本来使用pyinstaller,它工作得很好。当我尝试使用Vpython脚本时,它不起作用,openCV only脚本也是如此,两者都是。我得到的错误是:

代码语言:javascript
复制
Traceback (most recent call last):
  File "C:\Python27\Scripts\pyinstaller-script.py", line 11, in <module>
    load_entry_point('PyInstaller==3.2.1', 'console_scripts', 'pyinstaller')()
  File "c:\python27\lib\site-packages\PyInstaller\__main__.py", line 90, in run
    run_build(pyi_config, spec_file, **vars(args))
  File "c:\python27\lib\site-packages\PyInstaller\__main__.py", line 46, in run_
build
    PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
  File "c:\python27\lib\site-packages\PyInstaller\building\build_main.py", line
788, in main
    build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'
))
  File "c:\python27\lib\site-packages\PyInstaller\building\build_main.py", line
734, in build
    exec(text, spec_namespace)
  File "<string>", line 16, in <module>
  File "c:\python27\lib\site-packages\PyInstaller\building\build_main.py", line
212, in __init__
    self.__postinit__()
  File "c:\python27\lib\site-packages\PyInstaller\building\datastruct.py", line
161, in __postinit__
    self.assemble()
  File "c:\python27\lib\site-packages\PyInstaller\building\build_main.py", line
535, in assemble
    redirects=self.binding_redirects))
  File "c:\python27\lib\site-packages\PyInstaller\depend\bindepend.py", line 227
, in Dependencies
    for lib, npth in selectImports(pth, xtrapath):
  File "c:\python27\lib\site-packages\PyInstaller\depend\bindepend.py", line 510
, in selectImports
    npth = getfullnameof(lib, xtrapath)
  File "c:\python27\lib\site-packages\PyInstaller\depend\bindepend.py", line 82,
 in getfullnameof
    if os.path.exists(npth) and matchDLLArch(npth):
  File "c:\python27\lib\site-packages\PyInstaller\depend\bindepend.py", line 194
, in matchDLLArch
    pe = pefile.PE(filename, fast_load=True)
  File "c:\python27\lib\site-packages\PyInstaller\lib\pefile.py", line 1720, in
__init__
    self.__parse__(name, data, fast_load)
  File "c:\python27\lib\site-packages\PyInstaller\lib\pefile.py", line 1799, in
__parse__
    raise PEFormatError('DOS Header magic not found.')
PyInstaller.lib.pefile.PEFormatError: 'DOS Header magic not found.'

我有:

代码语言:javascript
复制
PyInstaller: 3.2.1
Python: 2.7.13 x64
Platform: Windows-8.1 x64

该怎么办呢?

EN

回答 1

Stack Overflow用户

发布于 2017-06-23 04:04:29

提出VPython问题的更好地方是VPython论坛,网址为

https://groups.google.com/forum/?fromgroups&hl=en#!forum/vpython-users

在那里你可能会发现有PyInstaller经验的VPython用户(我没有)。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/43941862

复制
相关文章

相似问题

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