From: Zwicky,
William R ERDC-CERL-IL C. <Wil...@us...> - 2009-10-06 01:05:31
|
> From: Simon Wimmer [mailto:wim...@go...] > Sent: Friday, October 02, 2009 9:06 AM > > error: MSVCP90.dll: No such file or directory > ASIDE: Anyone out there got access to the Wiki? This has been solved several times, it would be nice if we didn't need to keep reposting it here. Thanks! Back to the issue: This problem has occurred many-many-many-many times. The problem is not only that the DLLs are missing, but that they're not ordinary DLLs, so you can't just copy them over. They are part of Microsoft's new side-by-side system (C:\WINDOWS\WinSxS) for managing the different versions of DLLs a system needs. It's a decent solution, but it's taking time for everyone to understand how to use it. The problem itself is caused by Python 2.6, which now requires the Microsoft Visual C 9.0 assembly. Py2exe doesn't understand this, and doesn't grab the assembly automatically. But if you copy the assembly along side your exe manually, then it will work just fine. You do this by creating a dir named "Microsoft.VC90.CRT", then placing these files inside: msvcm90.dll msvcp90.dll msvcr90.dll Microsoft.VC90.CRT.manifest You can find the assembly in C:\WINDOWS\WinSxS, though it might be in your Python 2.6 dir instead. The DLLs will be in a dir named like "x86_Microsoft.VC90.CRT_*". The rest of the name varies based on version number. The manifest file is in the Manifests dir, with a name matching the full name of the dir where you found the DLLs. Copy out the manifest and rename it as above. You can tweak your setup.py to include these files automatically. You'll need something like this: datafiles = [ ("Microsoft.VC90.CRT", [ "misc/Microsoft.VC90.CRT/msvcp90.dll", "misc/Microsoft.VC90.CRT/msvcr90.dll", "misc/Microsoft.VC90.CRT/msvcm90.dll", "misc/Microsoft.VC90.CRT/Microsoft.VC90.CRT.manifest"]), ] The other solution is to download Microsoft's installer for the above, which will permanently install these DLLs into the Windows dir. You won't need to include them in your setup.py, but every user will need to run this if they don't have Python 2.6 installed. http://www.microsoft.com/downloads/details.aspx?familyid=9B2DA534-3E03-4391-8 A4D-074B9F2BC1BF Note that the license for this is a little weird; it's not clear whether you're allowed to redistribute the DLLs (or even the installer) unless you own Microsoft Visual C. -Bill |