2012-10-30 110 views
9

我终于得到PyInstaller来建立一个exe文件,但它没有运行。当我打开它,我在一个对话框中得到这样的:PyInstaller运行时错误? (R6034)

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. 

这里是我的规格:

# -*- 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')) 

我环顾四周,并似乎没有人有这个同样的问题。

如果它改变了一切,这个脚本使用wxPython。

+2

我有与pyinstaller 3.2和python 2.7.11相同的问题。回到pyinstaller 3.1解决了这个问题:) – mba7

回答

1

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

看看你能不能使用的解决方法:

我能够通过使用 onedir选项,而不是onefile生成可执行来解决这个问题,那么只需将清单 移动到包含单个文件可执行文件的目录,该目录允许其运行 。

好像他们是在3.0

+0

我现在有同样的问题,使用onedir也适用于我。但是我在pyinstaller的开发人员发布,所以它似乎并没有被修复。 – Zitrax

3

我最近开始得到修复它“运行时错误?(R6034)” 这是关于这一点我曾使用pyinstaller之前编译到onefile了坚实现有的Python程序。我注意到,这个问题只发生在编译后的exe文件后重新命名。一旦我将它重新命名为原始的exe名称,R6034就消失了。

Leason了解到......在pyinstaller构建之后,请勿重命名您的exe文件。如果您需要使用不同的名称,请更改源py名称,然后重新编译。

10

我要发表评论,但没有足够的代表。虽然之前有人问我,但我最近遇到了同样的问题,结果是3.2版的Pyinstaller bug。

产生的EXE与R6034终止升级后pyinstaller 3.2: 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 

使用这在我的要求文件,而不是pyinstaller == 3.2补丁对我来说!

+2

这对我有用,所以在某些情况下,至少这是正确的答案! – Valmond

+1

迄今为止的正确答案。 –