[python-win32] Recurring DLL error with py2exe

Jacob Kruger blindza at gmail.com
Thu Aug 25 16:30:56 CEST 2011


Ok, where should I include that exclude line?

I tried just copying it into the setup.py file a bit higher up, but not sure if needs to be specifically included in some part of it, and I found out if I also tried to tell it not to copy the MSVCRT subfolder it still generates that error so it must have something to do with the actual compilation processing of the external module or something, but, maybe if I just need to tell it to exclude those files from a specific spot in the setup.py file that could sort it out?

Anyway, here's current source of my setup.py file:
#---start of source---
from glob import glob
from distutils.core import setup
import py2exe
dll_excludes = ['libgdk-win32-2.0-0.dll', 'libgobject-2.0-0.dll', 'tcl84.dll', 'tk84.dll', 'MSVCP90.dll', 'mswsock.dll', 'powrprof.dll']
data_files = [
("Microsoft.VC90.CRT", glob(r'C:\Program Files\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT\*.*'))
]
#data_files= []
options = {
    "bundle_files": 1,
    "ascii": 1, # to make a smaller executable, don't include the encodings
    "compressed": 1, # compress the library archive
    }

setup(
    # The first three parameters are not required, if at least a
    # 'version' is given, then a versioninfo resource is built from
    # them and added to the executables.
    version = "1.0.0",
    description = "testingWxPython",
    name = "aboutBox",
    options = {'py2exe': options},

    # targets to build
    console = ["AboutBox.py"],
data_files=data_files
    )
#---end of source---

Could it also maybe be something to do with this line?:
    console = ["AboutBox.py"],

Since while setup.py is running in console mode, don't know if the resulting wxPython based .exe runs in a console mode window as such..?

Thanks

Jacob Kruger
Blind Biker
Skype: BlindZA
'...fate had broken his body, but not his spirit...'

----- Original Message ---------------

Subject: Re: [python-win32] Recurring DLL error with py2exe
   From: "Werner F. Bruhin" <werner.bruhin at free.fr>
   Date: Thu, 25 Aug 2011 16:06:05 +0200
     To: python-win32 at python.org

>Hi Jacob,
>
>On 08/25/2011 03:02 PM, Jacob Kruger wrote:
>> Thought this problem was specific to pyaudiere, but now got same thing when tried to test using py2exe on a very small, test wxPython app to make sure it was worth focusing on this in terms of GUI's etc., but it again tells me the same thing.
>>
>> Typed in following command line code using sort of standard setup.py file that works on other things like my mapData IF engine, but did change the name of the .py file it should process:
>> python setup.py py2exe
>>
>> The last 2 lines rendered in that window are then the following:
>> *** finding dlls needed ***
>> error: MSVCP90.dll: No such file or directory
>>
>> That specific DLL gets copied quite easily into the relevant subfolder of the dist folder when I run a similar command for my much larger, but, I suppose, simpler, mapData app, since that one doesn't try to import libraries/modules like piaudiere or wxPython as such.
>>
>> Any thoughts on what could really be happening here, or should I try sort out reinstalling windows7 or something...?
>py2exe is getting confused on this DLL for some reason, you just need to 
>exclude it.
>
>dll_excludes = ['libgdk-win32-2.0-0.dll', 'libgobject-2.0-0.dll', 
>'tcl84.dll', 'tk84.dll', 'MSVCP90.dll', 'mswsock.dll', 'powrprof.dll']
>
>Additional information for wxPython and py2exe can be found on the wiki 
>here:
>
>http://wiki.wxpython.org/py2exe
>
>Werner
>
>_______________________________________________
>python-win32 mailing list
>python-win32 at python.org
>http://mail.python.org/mailman/listinfo/python-win32


More information about the python-win32 mailing list