Which version of MSVC?90.DLL's to distribute with Python 2.6 based Py2exe executables?
python at bdurham.com
python at bdurham.com
Tue Dec 29 13:31:48 EST 2009
Jonathan,
<snipped>
I'm going to try to run vcredist_x86.exe automatically (as opposed to
asking my users to download and run it manually). I don't currently
have any installer, so I'm going to run vcredist_x86.exe on my
application start-up. Some logic like this seems to do this trick:
if platform.system() == 'Windows':
command = [path.join('lib', 'vcredist_x86.exe'), '/q']
retcode = subprocess.call(command)
if retcode != 0:
sys.stderr.write(
'Return value %d from vcredist_x86.exe\n' %
(retcode,))
This seems to work. My py2exe program will now run out of the box on a
bare-bones Windows XP install. (note: running 'vcredist_x86.exe /qu'
will uninstall the DLLs again)
</snipped>
I'm surprised that this technique works because the Python interpreter
itself needs to find the MSVC*90.DLL files before it can startup and run
your program that installs the MSVC*90.DLL files. Sort of a chicken and
egg scenario.
Malcolm
More information about the Python-list
mailing list