2017-05-12 32 views
0

openCVとVpythonを使用するスクリプトからexeファイルを生成しようとしていますが、問題があります。 pyinstallerを使って、うまく動作した単純なプリントスクリプトを試してみました。私がopenCVのみのスクリプトで試してみると、Vpythonのスクリプトだけで動作しませんでした。私は取得していますエラーはこれです:OpenCVとVPythonを使用するPythonスクリプトでのPyInstallerエラー(DOSヘッダマジックが見つかりません)

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.' 

私が持っている:

PyInstaller: 3.2.1 
Python: 2.7.13 x64 
Platform: Windows-8.1 x64 

何をすべきか?

答えて

0

VPythonの質問を提起するには良い場所はありますが(私はしません)pyInstallerの経験を持っているVPythonユーザーを見つけるかもしれない

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

でVPythonフォーラムです。

+0

ありがとうございました。私は仮想マシンをインストールしてそれを回避し、その上にすべてをインストールしてから32ビットを試してみました。うまくいきました。私は誰かが将来的に助けることができる答えを持っているかもしれない場合に備えてこれを保った。 –

関連する問題