[Python-au] py2exe mscvr90.dll problem

Andrew Milton akm at theinternet.com.au
Mon Jul 13 11:37:00 UTC 2009

+-------[ Mike Dewhirst ]----------------------
| I seem to have dug myself into a hole and hope some py2exe person might 
| be able to help.
| Python 2.6.2
| Windows XP (various levels of patching)
| My script does some pretty basic filesystem housekeeping and works 
| exactly as expected. I zip it up with some other executables and use 
| WinZip to create a self-extracting zip-file which launches my (py2exe'd) 
| script when it finishes unzipping into the Windows temp folder.
| On my desktop machine it works flawlessly but on a machine without 
| Python 2.6 installed it craps out before launching with a complaint 
| about msvcr90.dll.
| I checked ...
| http://www.devpicayune.com/entry/building-python-26-executables-for-windows
| ... among a few other sites and got myself in deeper with different 
| Windows errors.
| Any hints appreciated

You need the appropriate visual C++ runtime redistributable installed. 
What the other guides do, is to tell you to just grab "some" files that it
normally installs and put them into your distribution.

If you're going that route (which is a gray area in terms of commercial
distribution), you need to add the files to your py2exe script to be
bundled up as "data_files" in your call to setup(). 

Normally I just cheated and told it to grab the appropriate DLL(s) from 
the python directory...

So in my setup.py I have something like this;

setup(<your other setup options>,
      data_files = [(".", [r"c:\Python24\MSVCP71.dll",]), ] 

this is obviously for python 2.4, adjust for 2.6

Andrew Milton
akm at theinternet.com.au

More information about the python-au mailing list