Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Which version of MSVC?90.DLL's to distribute with Python 2.6 basedPy2exe executables?

Reply
Thread Tools

Which version of MSVC?90.DLL's to distribute with Python 2.6 basedPy2exe executables?

 
 
python@bdurham.com
Guest
Posts: n/a
 
      12-17-2009
Does anyone have any recommendations on which version of the
MSVC?90.DLL's need to be distributed with a Python 2.6.4 PY2EXE (0.6.9)
based executable? (I assume I need just a matching pair of MSVCR90.DLL
and MSVCP90.DLL?)

My understanding is that I need to match the version of the DLL's that
my version of Python 2.6.4 was compiled against?

On my Windows 7 Professional (64-bit) workstation, I have the following
sets of MSVC?9.DLL files to choose from.

Directory of C:\Program Files\Sony\VAIO Care
07/14/2009 01:18 PM 245,248 msvcm90.dll
07/14/2009 01:18 PM 851,456 msvcp90.dll
07/14/2009 01:18 PM 627,200 msvcr90.dll
3 File(s) 1,723,904 bytes

Directory of C:\Program Files\Sony\VAIO
Care\plugins\Microsoft.VC90.CRT
07/14/2009 01:18 PM 245,248 msvcm90.dll
07/14/2009 01:18 PM 851,456 msvcp90.dll
07/14/2009 01:18 PM 627,200 msvcr90.dll
3 File(s) 1,723,904 bytes

Directory of C:\Program Files (x86)\Sony\VAIOData Restore Tool
11/26/2008 10:26 AM 568,832 msvcp90.dll
11/26/2008 08:57 AM 655,872 msvcr90.dll
2 File(s) 1,224,704 bytes

Directory of C:\Program Files (x86)\Sony\VAIO Recovery\plugins
07/15/2009 05:21 PM 224,768 msvcm90.dll
07/15/2009 05:21 PM 568,832 msvcp90.dll
07/15/2009 05:21 PM 655,872 msvcr90.dll
3 File(s) 1,449,472 bytes

Directory of C:\Program Files (x86)\Sony\VAIO
Recovery\plugins\x64
07/15/2009 05:21 PM 627,200 msvcr90.dll
1 File(s) 627,200 bytes
Directory of C:\Program Files (x86)\Sony\VAIO VP Utilities
04/02/2009 07:12 PM 568,832 msvcp90.dll
04/02/2009 07:12 PM 655,872 msvcr90.dll
2 File(s) 1,224,704 bytes

Directory of
C:\Windows\winsxs\amd64_microsoft.vc90.crt_1fc8b3b 9a1e18e3b_9.0.2
1022.8_none_750b37ff97f4f68b
09/04/2009 04:35 AM 245,248 msvcm90.dll
09/04/2009 04:35 AM 851,456 msvcp90.dll
09/04/2009 04:35 AM 627,200 msvcr90.dll
3 File(s) 1,723,904 bytes

Directory of
C:\Windows\winsxs\amd64_microsoft.vc90.crt_1fc8b3b 9a1e18e3b_9.0.3
0729.4926_none_08e1a05ba83fe554
06/10/2009 03:31 PM 245,760 msvcm90.dll
06/10/2009 03:31 PM 853,328 msvcp90.dll
06/10/2009 03:31 PM 623,440 msvcr90.dll
3 File(s) 1,722,528 bytes

Directory of
C:\Windows\winsxs\x86_microsoft.vc90.crt_1fc8b3b9a 1e18e3b_9.0.210
22.8_none_bcb86ed6ac711f91
09/04/2009 04:35 AM 224,768 msvcm90.dll
09/04/2009 04:35 AM 568,832 msvcp90.dll
09/04/2009 04:35 AM 655,872 msvcr90.dll
3 File(s) 1,449,472 bytes

Directory of
C:\Windows\winsxs\x86_microsoft.vc90.crt_1fc8b3b9a 1e18e3b_9.0.307
29.1_none_e163563597edeada
09/04/2009 04:19 AM 225,280 msvcm90.dll
09/04/2009 04:19 AM 572,928 msvcp90.dll
09/04/2009 04:19 AM 655,872 msvcr90.dll
3 File(s) 1,454,080 bytes

Directory of
C:\Windows\winsxs\x86_microsoft.vc90.crt_1fc8b3b9a 1e18e3b_9.0.307
29.4926_none_508ed732bcbc0e5a
06/10/2009 04:14 PM 225,280 msvcm90.dll
06/10/2009 04:14 PM 569,664 msvcp90.dll
06/10/2009 04:14 PM 652,608 msvcr90.dll
3 File(s) 1,447,552 bytes

Thank you,
Malcolm
 
Reply With Quote
 
 
 
 
Ross Ridge
Guest
Posts: n/a
 
      12-17-2009
<(E-Mail Removed)> wrote:
>Does anyone have any recommendations on which version of the
>MSVC?90.DLL's need to be distributed with a Python 2.6.4 PY2EXE (0.6.9)
>based executable? (I assume I need just a matching pair of MSVCR90.DLL
>and MSVCP90.DLL?)


Either the one the came with your copy Microsoft Visual C++ or Python
2.6.4. Otherwise, you don't have the legal right to redistribute
Microsoft's code.

Ross Ridge

--
l/ // Ross Ridge -- The Great HTMU
[oo][oo] http://www.velocityreviews.com/forums/(E-Mail Removed)
-()-/()/ http://www.csclub.uwaterloo.ca/~rridge/
db //
 
Reply With Quote
 
 
 
 
Jonathan Hartley
Guest
Posts: n/a
 
      12-17-2009
On Dec 17, 5:36*pm, Ross Ridge <(E-Mail Removed)> wrote:
> <(E-Mail Removed)> wrote:
> >Does anyone have any recommendations on which version of the
> >MSVC?90.DLL's need to be distributed with a Python 2.6.4 PY2EXE (0.6.9)
> >based executable? (I assume I need just a matching pair of MSVCR90.DLL
> >and MSVCP90.DLL?)

>
> Either the one the came with your copy Microsoft Visual C++ or Python
> 2.6.4. *Otherwise, you don't have the legal right to redistribute
> Microsoft's code.
>
> * * * * * * * * * * * * * * * * * * * * Ross Ridge
>
> --
> *l/ *// * Ross Ridge -- The Great HTMU
> [oo][oo] *(E-Mail Removed)
> -()-/()/ *http://www.csclub.uwaterloo.ca/~rridge/
> *db *// *


Hi. I clearly haven't yet quite understood this very well.

Only this week I sent a py2exe-derived executable to someone else (a
non-developer) and it would not run on their WinXP machine ("'The
system cannot execute the specified program'") - my current favourite
hypothesis is that my omission of this dll or something similar was to
blame.

To diagnose what's wrong, I can't get access to the machine that gives
the above error. To try and reproduce, I'm right now in the process of
creating a bare-bones WindowsXP installed on a VM.

My questions are, sadly, legion:


1) I don't understand why the OP's question doesn't deserve a literal
answer - isn't one of those DLLs in the WinSxS directory derived from
his MSVC install? In which case does he have the rights to
redistribute it?


Ross said:
> Either the one the came with your copy Microsoft Visual C++ or Python 2.6..4.


2) The required dlls come with Python? Whatwhatwhat? Is this if I
download Python source to compile myself?

2b) Presumably these runtimes must come with Visual Studio express
edition (the free one.) I assume I can just prise the required DLL off
my filesystem after MSVS express edition has installed, rather than
insisting that my users run the MSVC runtime installer at

3) The wxpython site describes that I have to use a manifest file as
well as the DLLs, although I find no mention of the word 'manifest' on
www.py2exe.org, excepting a vaguely worded news item. Other sites (eg.
StackOverflow) report conflicting ideas of whether and when this
manifest file is needed. Is there a simple answer to whether this is
required?


4) The py2exe wiki says, of the msvc runtime dll version 7.1 (for
versions of Python prior to 2.6) that:

"Since most Windows installations nowadays include this DLL by
default, it may be unnecessary."

To what extent is this true? Does the same not also apply to the msvc
runtime 9.0 dll? (for Python 2.6.4)


Malcome said:
> (I assume I need just a matching pair of MSVCR90.DLL and MSVCP90.DLL?)


5) Whatwhatwhat again? More than one DLL is required? Are there ever
any more than these two?


Sorry to be dense. Terse links to useful sources of information
appreciated. I've read the whole py2exe wiki and been googling the
last hour.

Jonathan
 
Reply With Quote
 
Ross Ridge
Guest
Posts: n/a
 
      12-17-2009
Jonathan Hartley <(E-Mail Removed)> wrote:
>1) I don't understand why the OP's question doesn't deserve a literal
>answer ...


I gave what I thought was a simple, direct and literal answer.

>.. isn't one of those DLLs in the WinSxS directory derived from
>his MSVC install?


I have no idea. He might not even have Microsoft Visual C++ installed
on his machine.

>2) The required dlls come with Python? Whatwhatwhat?


The DLLs are required for Python to work, so yes the DLLs are included in
the official binary Python distribution for Windows.

> Is this if I download Python source to compile myself?


No, the DLLs aren't included in the source distribution. However, if
you compile the Python source yourself with a suitably licenced copy of
Microsoft Visual C++ then you'd be allowed to redistribute the Microsoft
Runtime DLLs as a part of your own binary Python distribution.

>2b) Presumably these runtimes must come with Visual Studio express
>edition (the free one.)


I'd assume so, but you should check the the terms of the EULA for that
particular product to make sure it also allows you to redistribute the
runtime DLLs.

> I assume I can just prise the required DLL off my filesystem after
>MSVS express edition has installed, rather than insisting that my users
>run the MSVC runtime installer at


It would problably simpler to use the DLL included in the "redist"
subdirectory of Microsoft Visual C++ installation. That is, assumming
there is one, again you'll need to check the EULA. Sometimes Microsoft
makes specific requirements on how its redistributables are packaged and
installed, and that definately seems to be the case with Visual C++ 2008.

>4) The py2exe wiki says, of the msvc runtime dll version 7.1 (for
>versions of Python prior to 2.6) that:
>
> "Since most Windows installations nowadays include this DLL by
>default, it may be unnecessary."
>
>To what extent is this true?


It's less true for newer versions of Windows. I know there are a fair
number of people running Windows Vista and Windows 7 who've run into
problems with my own py2exe wrapped program because their machines don't
already have MSVCR71.DLL installed in their system directories.

>Does the same not also apply to the msvc
>runtime 9.0 dll? (for Python 2.6.4)


I'd assume the problem would be even worse. I don't think Microsoft
allows the 9.0 runtime to be installed in system directory, so the
specific version of the runtime would need to be already installed the
WinSxS directory.

>Malcome said:
>> (I assume I need just a matching pair of MSVCR90.DLL and MSVCP90.DLL?)

>
>5) Whatwhatwhat again? More than one DLL is required? Are there ever
>any more than these two?


The "P" DLL is for C++ and so the original poster may not actually need
it. I'm pretty sure Python itself doesn't need it, and py2exe shouldn't
either, but wxPython, or more precisely wxWidgets, almost certainly does.
So in your case you'll probably need to redistribute both DLLs.

Ross Ridge

--
l/ // Ross Ridge -- The Great HTMU
[oo][oo] (E-Mail Removed)
-()-/()/ http://www.csclub.uwaterloo.ca/~rridge/
db //
 
Reply With Quote
 
Mark Hammond
Guest
Posts: n/a
 
      12-17-2009
On 18/12/2009 7:44 AM, Ross Ridge wrote:
> The "P" DLL is for C++ and so the original poster may not actually need
> it. I'm pretty sure Python itself doesn't need it, and py2exe shouldn't
> either, but wxPython, or more precisely wxWidgets, almost certainly does.
> So in your case you'll probably need to redistribute both DLLs.


FYI, my experience is that an entire manifest must be distributed. As
the manifest in question actually lists 3 DLLs, IIUC, you must ship all
4 files - the 3 DLLs and the manifest, even if only one of the DLLs is
actually used.

This is from memory some time back though, so apologies in advance if
I'm mis-remembering.

Mark
 
Reply With Quote
 
Jonathan Hartley
Guest
Posts: n/a
 
      12-21-2009
On Dec 17, 8:39*pm, Christian Heimes <(E-Mail Removed)> wrote:
> Jonathan Hartley wrote:
> > Only this week I sent a py2exe-derived executable to someone else (a
> > non-developer) and it would not run on their WinXP machine ("'The
> > system cannot execute the specified program'") - my current favourite
> > hypothesis is that my omission of this dll or something similar was to
> > blame.

>
> > To diagnose what's wrong, I can't get access to the machine that gives
> > the above error. To try and reproduce, I'm right now in the process of
> > creating a bare-bones WindowsXP installed on a VM.

>
> MSVCR90 is a side-by-side assembly (SxS). You can't just copy a SxS
> assembly to another computer. You must at least ship the manifest file,
> too. The easiest way to get your program running is the installation of
> the MSVCR redistributable installer.
>
> Christian



Hey Christian,

Many thanks for that, but my issue is that my programs work fine for
me on my computer - but then fail on other people's computers. I'd
very strongly prefer for my users to not have to install the MSVCR
redistributable installer as well as my program - it would be much
better if I could bundle everything up into my py2exe package so that
it 'just works' on any Windows computer. So I think that means I'm
looking for a stand-alone DLL (or several, plus the manifest file, it
sounds like) to bundle up with my py2exe.
 
Reply With Quote
 
Jonathan Hartley
Guest
Posts: n/a
 
      12-21-2009
On Dec 17, 11:16*pm, Mark Hammond <(E-Mail Removed)> wrote:
> On 18/12/2009 7:44 AM, Ross Ridge wrote:
>
> > The "P" DLL is for C++ and so the original poster may not actually need
> > it. *I'm pretty sure Python itself doesn't need it, and py2exe shouldn't
> > either, but wxPython, or more precisely wxWidgets, almost certainly does.
> > So in your case you'll probably need to redistribute both DLLs.

>
> FYI, my experience is that an entire manifest must be distributed. *As
> the manifest in question actually lists 3 DLLs, IIUC, you must ship all
> 4 files - the 3 DLLs and the manifest, even if only one of the DLLs is
> actually used.
>
> This is from memory some time back though, so apologies in advance if
> I'm mis-remembering.
>
> Mark



Thanks to everyone who replied, especially Ross obviously for such
comprehensive info.

I'll go percolate on what you wrote, and try some experiments on my
new VM, see if it all makes sense for me when I put it into practice.
 
Reply With Quote
 
Ross Ridge
Guest
Posts: n/a
 
      12-21-2009
Jonathan Hartley <(E-Mail Removed)> wrote:
>Many thanks for that, but my issue is that my programs work fine for
>me on my computer - but then fail on other people's computers. I'd
>very strongly prefer for my users to not have to install the MSVCR
>redistributable installer as well as my program - it would be much
>better if I could bundle everything up into my py2exe package so that
>it 'just works' on any Windows computer. So I think that means I'm
>looking for a stand-alone DLL (or several, plus the manifest file, it
>sounds like) to bundle up with my py2exe.


Microsoft's documentation describes several possible ways you can
redistribute the Visual C++ runtime:

http://msdn.microsoft.com/en-us/library/ms235299.aspx

From the sounds of things, if you only have Visual C++ 2008 Express your
only option may be to use Visual C++ Redistributable Package.

Ross Ridge

--
l/ // Ross Ridge -- The Great HTMU
[oo][oo] (E-Mail Removed)
-()-/()/ http://www.csclub.uwaterloo.ca/~rridge/
db //
 
Reply With Quote
 
Jonathan Hartley
Guest
Posts: n/a
 
      12-25-2009
On Dec 21, 2:56*pm, Ross Ridge <(E-Mail Removed)> wrote:
> Jonathan Hartley *<(E-Mail Removed)> wrote:
>
> >Many thanks for that, but my issue is that my programs work fine for
> >me on my computer - but then fail on other people's computers. I'd
> >very strongly prefer for my users to not have to install the MSVCR
> >redistributable installer as well as my program - it would be much
> >better if I could bundle everything up into my py2exe package so that
> >it 'just works' on any Windows computer. So I think that means I'm
> >looking for a stand-alone DLL (or several, plus the manifest file, it
> >sounds like) to bundle up with my py2exe.

>
> Microsoft's documentation describes several possible ways you can
> redistribute the Visual C++ runtime:
>
> * * * *http://msdn.microsoft.com/en-us/library/ms235299.aspx
>
> From the sounds of things, if you only have Visual C++ 2008 Express your
> only option may be to use Visual C++ Redistributable Package.
>
> * * * * * * * * * * * * * * * * Ross Ridge
>
> --
> *l/ *// * Ross Ridge -- The Great HTMU
> [oo][oo] *(E-Mail Removed)
> -()-/()/ *http://www.csclub.uwaterloo.ca/~rridge/
> *db *// *



Hey. So I think I'm finally getting it.

Am I right to infer that if I want to distribute a py2exe'd
application legally, and have half a chance of it working on a non-
developer's machine, then I have to:

a) Ask my users to run the Visual C++ redistributable installer, as
well as download my program. This is really unfortunate, since one of
the major disadvantages of coding something in Python as opposed to as
a web application is the overhead of asking users to download and
execute anything at all. Asking them to do it twice seems problematic.
Most users would regard this as a deal-breaking hurdle, do you think?

or

b) Buy a copy of Visual Studio in order to acquire the rights to
distribute msvcr.dll (etc.) along with my application.

This is kind of a shame, because it rules out the most obvious and
desirable solution, which would be to distribute the DLLs which are
required to give my Python application half a chance of running on my
target user's PC's, without having to buy Visual Studio.

 
Reply With Quote
 
Ross Ridge
Guest
Posts: n/a
 
      12-26-2009
Jonathan Hartley <(E-Mail Removed)> wrote:
>Am I right to infer that if I want to distribute a py2exe'd
>application legally, and have half a chance of it working on a non-
>developer's machine, then I have to:
>
>a) Ask my users to run the Visual C++ redistributable installer, as
>well as download my program. This is really unfortunate, since one of
>the major disadvantages of coding something in Python as opposed to as
>a web application is the overhead of asking users to download and
>execute anything at all. Asking them to do it twice seems problematic.
>Most users would regard this as a deal-breaking hurdle, do you think?
>
>or
>
>b) Buy a copy of Visual Studio in order to acquire the rights to
>distribute msvcr.dll (etc.) along with my application.


If your users are paying to download your program then spending $1000 or
whatever it is to buy Visual C++ doesn't seem to be unreasonable expense
to make sure you're staying well within the right side of the law.
If you're giving it away for free, or aren't expecting to make enough
money to make spending $1000 worthwhile, then asking them to download
something sepeately doesn't seem to be unreasonable either. I give
my py2exe wrapped application for free so I'm not losing sleep just
because a few people can't run it because they don't have 7.1 runtime
already installed.

That said, you might have couple of other options. Microsoft's
documentation says that with the Express edition, "it is recommended to
redistribute Visual C++ libraries using the Visual C++ Redistributable
Package." That suggests that you can redistribute the package with your
application and have your installer run it automatically. My older copy
of the Windows SDK includes the Visual C++ 2005 compilers with the C/C++
runtime merge modules, so lastest version of the SDK might include 2008
merge modules.

Whatever you do, make sure you install the runtime correctly. Part of
the reason for the restrictions on redistributing the runtime is so people
don't just bindly copy DLLs around. That leads to older DLLs overriding
newer DLLs and makes it difficult for Micrsoft to make security fixes.
In particular they don't want a repeat of the GDI+ fiasco, where a buffer
overrun of the image processing routines resulted security vulnerabilities
in a lot of third party applications that couldn't be easily fixed by
deploying a patched DLL with Windows Update.

Ross Ridge

--
l/ // Ross Ridge -- The Great HTMU
[oo][oo] (E-Mail Removed)
-()-/()/ http://www.csclub.uwaterloo.ca/~rridge/
db //
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: A new script which creates Python 3.3 venvs with Distribute andpip installed in them Ian Kelly Python 0 01-30-2013 08:42 PM
A new script which creates Python 3.3 venvs with Distribute and pipinstalled in them Vinay Sajip Python 0 01-30-2013 08:09 PM
Re: Where to get stand alone Dot Net Framework version 1.1, version2.0, version 3.0, version 3.5, version 2.0 SP1, version 3.0 SP1 ? MowGreen [MVP] ASP .Net 5 02-09-2008 01:55 AM
Re: Where to get stand alone Dot Net Framework version 1.1, version 2.0, version 3.0, version 3.5, version 2.0 SP1, version 3.0 SP1 ? PA Bear [MS MVP] ASP .Net 0 02-05-2008 03:28 AM
Re: Where to get stand alone Dot Net Framework version 1.1, version 2.0, version 3.0, version 3.5, version 2.0 SP1, version 3.0 SP1 ? V Green ASP .Net 0 02-05-2008 02:45 AM



Advertisments