PyInstaller运行时错误?(R6034)

tkb*_*kbx 10 python pyinstaller

我终于得到了PyInstaller来构建一个exe文件,但它没有运行.一打开它,我就会在对话框中看到它:

Runtime Error!
Program C:\.....\MCManager.exe

R6034
An application has made an attempt to load the C runtime library incorrectly.
Please contact the application's support team for more information.
Run Code Online (Sandbox Code Playgroud)

这是我的规格:

# -*- mode: python -*-
a = Analysis(['MCManager.py'],
             pathex=['C:\\Users\\Lucas\\Dropbox'],
             hiddenimports=[],
             hookspath=None)
pyz = PYZ(a.pure)
exe = EXE(pyz,
          a.scripts,
          a.binaries,
          a.zipfiles,
          a.datas,
          name=os.path.join('dist', 'MCManager.exe'),
          debug=False,
          strip=None,
          upx=True,
          console=False,
          icon='MCManager.ico')
app = BUNDLE(exe,
             name=os.path.join('dist', 'MCManager.exe.app'))
Run Code Online (Sandbox Code Playgroud)

我环顾四周,似乎没有人有同样的问题.

如果它改变了什么,这个脚本使用wxPython.

Dou*_*oug 10

我打算发表评论,但代表不够.虽然这是前一段时间被问到的,但我最近遇到了同样的问题,结果证明它是版本3.2的Pyinstaller bug.

升级到pyinstaller 3.2后,生成的exe终止于R6034:https: //github.com/pyinstaller/pyinstaller/issues/1985

PyInstaller 3.2,OneFile R6034,32位Python 2.7.11 https://github.com/pyinstaller/pyinstaller/issues/2042

看起来他们已经在最新的开发版中修复了这个问题,并建议使用

pip install https://github.com/pyinstaller/pyinstaller/archive/develop.zip
Run Code Online (Sandbox Code Playgroud)

在我的需求文件中使用它而不是pyinstaller == 3.2为我修补它!

  • 这对我有用,所以在某些情况下至少它是正确的答案! (2认同)

hit*_*wen 1

这似乎是类似的问题https://github.com/pyinstaller/pyinstaller/issues/689

看看是否可以使用该解决方法:

我能够通过使用 onedir 选项而不是 onefile 构建可执行文件来解决该问题,然后只需将清单移动到包含单文件可执行文件的目录即可使其正常工作。

看来他们在3.0中修复了这个问题