Check the .dll files py2exe decided should be included - I suspect
powrprof.dll or something else is included when it should not be, and
that DLL fails to load on Vista.
HTH,
Mark
On 17/01/2011 2:12 AM, He Jibo wrote:
> Thanks so much for your help.
>
> *I have tried to use manifest as suggested by
> http://www.py2exe.org/index.cgi/Tutorial#Step521*
> *I build the exe under windows 7, but still can not run under windows
> xp. The error message is the same , "the procedure entry
> point_except_handler4_common could not be located in the dynamic link
> library msvcrt.dll"*
>
> Below is my new setup.py file for py2exe, with manifest included.
> Did I miss something?
>
> '''
> http://web.archiveorange.com/archive/v/5H3d11fesgvZXKvrYblh
> '''
> # Used successfully in Python2.5 with matplotlib 0.91.2 and PyQt4 (and
> Qt 4.3.3)
> from distutils.core import setup
> import py2exe
> #import mechanize
>
>
> # We need to import the glob module to search for all files.
> import glob
>
> data_files = [("Microsoft.VC90.CRT", glob.glob(r'C:\deploy xp\*.*'))]
>
> # We need to exclude matplotlib backends not being used by this
> executable. You may find
> # that you need different excludes to create a working executable with
> your chosen backend.
> # We also need to include include various numerix libraries that the
> other functions call.
>
> opts = {
> 'py2exe': { "includes" : ["sip"],
> 'excludes': ['_gtkagg', '_tkagg', '_agg2', '_cairo', '_cocoaagg',
> '_fltkagg', '_gtk', '_gtkcairo', ],
> 'dll_excludes': ['libgdk-win32-2.0-0.dll',
> 'libgobject-2.0-0.dll'],
> 'packages': ['lxml','pyquery','mechanize','reportlab'],
>
> }
> }
>
> # Save matplotlib-data to mpl-data ( It is located in the
> matplotlib\mpl-data
> # folder and the compiled programs will look for it in \mpl-data
> # note: using matplotlib.get_mpldata_info
>
>
>
> # for console program use 'console = [{"script" : "scriptname.py"}]
> setup(name="Top Ten Rank 1.2",
> version="1.1",
> description = " Top Ten Rank 1.2",
>
> author="He, Jibo",
> author_email="hejibo@... <mailto:hejibo@...>",
> url="http://www.ueseo.org",
> # zipfile = True,
> data_files=data_files,
> windows=[{"script" : "TopTenRank.py",
> 'icon_resources':[(1,"top10ranking.ico")]}],
> options=opts)
>
>
> 【 在 hgoldfish (老鱼) 的大作中提到: 】
> : 那个文件不过是一个文本文件而已,不用vs.
> : http://www.py2exe.org/index.cgi/Tutorial#Step521
>
> ---------------------------
> He Jibo
> Department of Psychology,
> Beckman Institute for Advanced Science and Technology
> University of Illinois, Urbana Champaign,
> 603 East Daniel St.,
> Champaign, IL 61820
> website: http://hejibo.appspot.com/file/index.html
>
>
>
> On Sun, Jan 16, 2011 at 7:20 AM, Werner F. Bruhin <werner.bruhin@...
> <mailto:werner.bruhin@...>> wrote:
>
> On 16/01/2011 12:40, He Jibo wrote:
>> Sorry for the confusion of "portable". I mean the users can use
>> the program without installation.
> I think it is easier for a user to run hejibo-setup.exe and it
> figures out what and where it needs to put things then doing e.g. an
> extract from some .zip file or a copy of some folders or .....
>
> Don't have a hang up on InnoSetup (or similar), it is really pretty
> easy to create an installer script and it helps to adapt
> automagically to the differences between XP, Vista, Win7.
>
>
> Werner
>> ---------------------------
>> He Jibo
>> Department of Psychology,
>> Beckman Institute for Advanced Science and Technology
>> University of Illinois, Urbana Champaign,
>> 603 East Daniel St.,
>> Champaign, IL 61820
>> website: http://hejibo.appspot.com/file/index.html
>>
>>
>>
>> On Sun, Jan 16, 2011 at 5:31 AM, Werner F. Bruhin
>> <werner.bruhin@... <mailto:werner.bruhin@...>> wrote:
>>
>> On 16/01/2011 11:25, He Jibo wrote:
>>> Thanks for your quick reply. Is there a solution of the .dll
>>> file problem without using InnoSetup? I wish to make my
>>> software portable, so my users do not need to install the
>>> software.
>> Portable to what? py2exe is "only" windows compatible.
>>
>> Anyhow you don't have to use InnoSetup, you can use any installer.
>>
>> Werner
>>
>>> ---------------------------
>>> He Jibo
>>> Department of Psychology,
>>> Beckman Institute for Advanced Science and Technology
>>> University of Illinois, Urbana Champaign,
>>> 603 East Daniel St.,
>>> Champaign, IL 61820
>>> website: http://hejibo.appspot.com/file/index.html
>>>
>>>
>>>
>>> On Sun, Jan 16, 2011 at 3:30 AM, Werner F. Bruhin
>>> <werner.bruhin@... <mailto:werner.bruhin@...>> wrote:
>>>
>>> On 16/01/2011 09:46, He Jibo wrote:
>>> > Hi, everyone,
>>> >
>>> > I need your help with deploying .exe files. I created a
>>> software using
>>> > packages including PySide, lxml, BeautifulSoup etc. I
>>> have successfully
>>> > built it under windows 7, and been able to run it in
>>> the same windows 7
>>> > machine. But I can not run the .exe program under
>>> Windows XP. I have not
>>> > tested in Windows Vista yet, but I need it to work
>>> under Vista too.
>>> > The error message I got under Windows XP is as follows:
>>> > **
>>> > *"the procedure entry point_except_handler4_common
>>> could not be located
>>> > in the dynamic link library msvcrt.dll"*
>>> > *
>>> > *
>>> > *Can someone help me how to build exe on windows 7 and
>>> deploy on vista
>>> > and xp? Thanks. *
>>> > *
>>> > *
>>> > I have tried methods as suggested by the following
>>> links, but it does
>>> > not work.
>>> >
>>> http://www.devcomments.com/q448413/Is-possible-to-build-exe-on-Vista-and-deploy-on-XP-using-py2exe
>>> >
>>> http://bytes.com/topic/python/answers/730751-py2exe-other-exe-builder-vista-system-vista-xp-install-targets
>>> > *
>>> > *
>>> > *My setup.py for py2exe is as follows:*
>>> > *
>>> > *
>>> > *
>>> > '''
>>> > http://web.archiveorange.com/archive/v/5H3d11fesgvZXKvrYblh
>>> > '''
>>> > # Used successfully in Python2.5 with matplotlib 0.91.2
>>> and PyQt4 (and
>>> > Qt 4.3.3)
>>> > from distutils.core import setup
>>> > import py2exe
>>> > #import mechanize
>>> >
>>> >
>>> > # We need to import the glob module to search for all
>>> files.
>>> > import glob
>>> >
>>> > # We need to exclude matplotlib backends not being used
>>> by this
>>> > executable. You may find
>>> > # that you need different excludes to create a working
>>> executable with
>>> > your chosen backend.
>>> > # We also need to include include various numerix
>>> libraries that the
>>> > other functions call.
>>> >
>>> > opts = {
>>> > 'py2exe': { "includes" : ["sip"],
>>> > 'excludes': ['_gtkagg', '_tkagg', '_agg2', '_cairo',
>>> '_cocoaagg',
>>> > '_fltkagg', '_gtk', '_gtkcairo', ],
>>> > 'dll_excludes': ['libgdk-win32-2.0-0.dll',
>>> > 'libgobject-2.0-0.dll'],
>>> > 'packages': ['lxml','pyquery','mechanize','reportlab'],
>>> >
>>> > }
>>> > }
>>> >
>>> > # Save matplotlib-data to mpl-data ( It is located in the
>>> > matplotlib\mpl-data
>>> > # folder and the compiled programs will look for it in
>>> \mpl-data
>>> > # note: using matplotlib.get_mpldata_info
>>> >
>>> >
>>> > # for console program use 'console = [{"script" :
>>> "scriptname.py"}]
>>> > setup(name="Top Ten Rank 1.2",
>>> > version="1.1",
>>> > description = " Top Ten Rank 1.2",
>>> >
>>> > author="He, Jibo",
>>> > author_email="hejibo@...
>>> <mailto:hejibo@...> <mailto:hejibo@...
>>> <mailto:hejibo@...>>",
>>> > url="http://www.ueseo.org",
>>> > # zipfile = True,
>>> > windows=[{"script" :
>>> >
>>> "TopTenRank.py",'icon_resources':[(1,"top10ranking.ico")]}],
>>> options=opts)
>>> >
>>> >
>>> No problem in creating exe on Windows 7 and distributing
>>> it to other
>>> Windows 7, Vista, XP, 2000 Systems.
>>>
>>> I can't recall having seen the exact error you get but I
>>> guess that the
>>> test machine does not have all the .dll's you need for
>>> your application.
>>>
>>> There are a few useful pages on the wxPython wiki, most
>>> of it should
>>> apply for you too.
>>>
>>> http://wiki.wxpython.org/Deployment
>>> http://wiki.wxpython.org/py2exe
>>>
>>> msvcrt.dll is the MS runtime for C++ 4.2 to 6.0, newer
>>> ones are named
>>> msvcrtXX.dll (XX is 80, 90) you need to include these in
>>> your installer
>>> (e.g. InnoSetup) and install them to the correct place or
>>> have the
>>> appropriate MS runtime installer run by your user.
>>>
>>> I consider that they are part of Python xx (or for
>>> msvcrt.dll I guess is
>>> used by QT) and consider that I can distribute it, but I
>>> am not a lawyer
>>> so you might want to research this a bit (there have been
>>> threads on
>>> this problem on this list).
>>>
>>> Hope this helps
>>> Werner
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Protect Your Site and Customers from Malware Attacks
>>> Learn about various malware tactics and how to avoid
>>> them. Understand
>>> malware threats, the impact they can have on your
>>> business, and how you
>>> can protect your company and customers by using code signing.
>>> http://p.sf.net/sfu/oracle-sfdevnl
>>> _______________________________________________
>>> Py2exe-users mailing list
>>> Py2exe-users@...
>>> <mailto:Py2exe-users@...>
>>> https://lists.sourceforge.net/lists/listinfo/py2exe-users
>>>
>>>
>>
>>
>
>
>
>
> ------------------------------------------------------------------------------
> Protect Your Site and Customers from Malware Attacks
> Learn about various malware tactics and how to avoid them. Understand
> malware threats, the impact they can have on your business, and how you
> can protect your company and customers by using code signing.
> http://p.sf.net/sfu/oracle-sfdevnl
>
>
>
> _______________________________________________
> Py2exe-users mailing list
> Py2exe-users@...
> https://lists.sourceforge.net/lists/listinfo/py2exe-users
|