Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PyInstaller Runtime Error? (R6034)

I've finally gotten PyInstaller to build an exe file, but it's not running. As soon as I open it, I get this in a dialog:

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.

Here's my spec:

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

I've looked around, and nobody seems to have this same problem.

If it changes things at all, this script uses wxPython.

like image 325
tkbx Avatar asked Oct 30 '12 20:10

tkbx


3 Answers

I recently started getting "Runtime Error? (R6034)" It was on a solid existing python program which I had used pyinstaller before to compile to a onefile. I noticed that the problem only happened after I renamed the exe after it had been compiled. Once I renamed it back to the original exe name, the R6034 went away.

Leason learned... don't rename your exe after building with pyinstaller. If you need your exe to have a different name, then change the source py name and then recompile.

like image 160
panofish Avatar answered Nov 12 '22 05:11

panofish


I was going to leave a comment, but not enough rep. Though this was asked awhile ago I recently ran into the same issue and it turned out to be a Pyinstaller bug with version 3.2.

Resulting exe terminates with R6034 after upgrade to pyinstaller 3.2: https://github.com/pyinstaller/pyinstaller/issues/1985

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

Looks like they've fixed this in the latest dev version and it's suggested to

pip install https://github.com/pyinstaller/pyinstaller/archive/develop.zip

Using this in my requirements file instead of pyinstaller==3.2 patched it for me!

like image 33
Doug Avatar answered Nov 12 '22 05:11

Doug


This seems to be similar problem https://github.com/pyinstaller/pyinstaller/issues/689

See if you can use that workaround:

I was able to fix the problem by building the executable using the onedir option instead of onefile, then simply moving just the manifest to the directory containing the single-file executable, which allowed it to work.

Seems they're fixing it in 3.0

like image 1
hithwen Avatar answered Nov 12 '22 06:11

hithwen