Which version of MSVC?90.DLL's to distribute with Python 2.6 based Py2exe executables?
Jonathan Hartley
tartley at tartley.com
Tue Dec 29 13:38:56 EST 2009
On 29/12/2009 18:31, python at bdurham.com wrote:
> 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
>
>
Yeah, I was still clearly a little fuzzy-headed from Christmas when I
even thought to try that. It only appeared to work, I was trying it on
another machine (not my bare-bones VM) and evidently the required
msvcr90.dll was already installed elsewhere on that machine.
I'm just going to give in and stick the manifest and dll directly in
with my application as described by others earlier, from the cheapest
copy of Visual Studio I can lay my hands on.
Thanks to everyone for their help on this, it's been plaguing me for ages.
Jonathan Hartley Made of meat. http://tartley.com
tartley at tartley.com +44 7737 062 225 twitter/skype: tartley
More information about the Python-list
mailing list