2
votes

I used the instructions here to create my application. I get this message every time I double click my application after creating it with py2exe:

The program can't start because MSVCR90.dll is missing from your computer...

I don't know how I'm suppose to get this file: MSVCR90.dll.

I know this question has been asked before but I'll be honest the answers have left me more confused and also I'm seeing different answers everywhere. Using the py2exe tutorial it says I need version 9.0.21022.8 of the MSVCR90.dll so I use the link they give me. I download and install it but now I don't know what to do next as it doesn't seem to do anything aside from making a mess of my c drive. I tried creating the application again but the problem doesn't go away. I looked up in my computer to see if I have MSVCR90.dll and it takes me to a weirdly named folder which contains three .dlls: msvcm90.dll, msvcp90.dll, msvcr90.dll.

I copied this msvcr90.dll (version: 9.0.30729.1) to the dist folder and ran the application but it still doesn't work as it says: Runtime error ... R6034...

I even changed setup.py to add this line:

options = {"py2exe": { "dll_excludes": ["msvcr90.dll"]}} but that didn't work either.

1
Try (re)installing Visual C 2008 redistributable, which you can get from hereuser1864610
Hey, I will do that but can you tell me what I should do afterwards. Do I rerun python setup.py py2exe? Or is there an intermediate step involved?shn
So I reinstalled it but it didn't do anything as still gives me the same error. I'm using windows 7 btw.shn
You should've wrote the edit as the answer and accept it, so it closes the question @shnK DawG

1 Answers

1
votes

Ok it worked. I had to include the images from the toolbar of my program within the dist folder. Aside from that you also need to exclude msvcp90.dll in setup.py.