Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pyinstaller and R6034 error

I have created a binary using Pyinstaller and Python 2.7 which when I run on the same machine it is built complains with a Runtime Error! R6034 "An application has made an attempt to load the C runtime library incorrectly."

If I use Process Explorer and look at the DLLs being used there are two instances of msvcr90.dll, one from the _MEI folder that pyinstaller created which is version 9.0.21022.8 and the second version from C:\Windows\wunsxs which is version 9.0.30729.4940.

Any idea how do I fix this issue?

like image 343
user2549917 Avatar asked Feb 14 '26 08:02

user2549917


1 Answers

I also have this problem. Right now the only workaround I found is to take the yourprogramname.exe.manifest file inside the Pyinstaller projectname/build/projectname/ directory and put it in the same directory of your exe file.

My manifest file is something like that:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
  <assemblyIdentity name="yourprogramname" processorArchitecture="x86" type="win32" version="1.0.0.0"/>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity name="Microsoft.VC90.CRT" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b" type="win32" version="9.0.21022.8"/>
    </dependentAssembly>
  </dependency>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity name="Microsoft.VC90.MFC" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b" type="win32" version="9.0.21022.8"/>
    </dependentAssembly>
  </dependency>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity language="*" name="Microsoft.Windows.Common-Controls" processorArchitecture="X86" publicKeyToken="6595b64144ccf1df" type="win32" version="6.0.0.0"/>
    </dependentAssembly>
  </dependency>
</assembly>

Also related:

https://groups.google.com/forum/?fromgroups#!topic/pyinstaller/AkU4pARcLUE

like image 73
unlink Avatar answered Feb 20 '26 22:02

unlink



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!