I have completed my first wxPython program --- a simple Alarm clock (file is attached), which works fine for my purposes.
Python version: 2.6.2
wxPython version: 2.8.10.1
py2exe version: 0.6.9
I have tried two different approaches to create an executable in Windows Vista (a setup.py file for windows and GUI2Exe.py) in Windows Vista --- both have failed.
In both approaches I get an error message during the compilation process:
C:\Python26\lib\site-packages\py2exe\build_exe.py:16: DeprecationWarning: the sets module is deprecated
import sets
What can I do to correct this problem?
--V
AlarmClock-wxE.py (8.09 KB)
Hi,
Virgil Stokes wrote:
I have completed my first wxPython program --- a simple Alarm clock (file is attached), which works fine for my purposes.
Python version: 2.6.2
wxPython version: 2.8.10.1
py2exe version: 0.6.9
I have tried two different approaches to create an executable in Windows Vista (a setup.py file for windows and GUI2Exe.py) in Windows Vista --- both have failed.
In both approaches I get an error message during the compilation process:
C:\Python26\lib\site-packages\py2exe\build_exe.py:16: DeprecationWarning: the sets module is deprecated
import sets
This is just a "warning" (which the py2exe dev's have to fix) it does not affect the creation of the exe, at least when I tried it last some time ago.
Are you getting any other error, is the exe generated in the "dist" folder? If yes, does it run or do you get an error when you try to run it.
If you get an error, you might want to attach your little application and the setup.py, so one can see what you are doing.
Werner
Werner F. Bruhin wrote:
Hi,
Virgil Stokes wrote:
I have completed my first wxPython program --- a simple Alarm clock (file is attached), which works fine for my purposes.
Python version: 2.6.2
wxPython version: 2.8.10.1
py2exe version: 0.6.9
I have tried two different approaches to create an executable in Windows Vista (a setup.py file for windows and GUI2Exe.py) in Windows Vista --- both have failed.
In both approaches I get an error message during the compilation process:
C:\Python26\lib\site-packages\py2exe\build_exe.py:16: DeprecationWarning: the sets module is deprecated
import sets
This is just a "warning" (which the py2exe dev's have to fix) it does not affect the creation of the exe, at least when I tried it last some time ago.
Yes, this is what I thought also; but, it seems that the compilation
then contains errors.
Are you getting any other error, is the exe generated in the "dist" folder?
No other warnings or errors and yes the *.exe file is generated in the
“dist” directly
If yes, does it run or do you get an error when you try to run it.
It does not execute. The error frame is as follows:
SetUpWxPython.py (1.11 KB)
···
Microsoft Visual C++ Runtime Library
Runtime Error!
Program D:\Python Code Testing\dist\AlarmClock-wxE.exe
R6034
An application has made an attemp to load the C runtime library
incorrectly.
Please contact the application’s support team for more information.
If you get an error, you might want to attach your little application
I did attach the code to my original email. The setup python file is
now attached.
–Thanks Werner
–V
Hi,
Virgil Stokes wrote:
...
No other warnings or errors and yes the *.exe file is generated in the "dist" directly
If yes, does it run or do you get an error when you try to run it.
It looks like py2exe generated your exe.
It does not execute. The error frame is as follows:
**************************************************************
Microsoft Visual C++ Runtime Library
Runtime Error!
Program D:\Python Code Testing\dist\AlarmClock-wxE.exe
R6034
An application has made an attemp to load the C runtime library incorrectly.
**************************************************************
Please contact the application's support team for more information.
If you get an error, you might want to attach your little application
I did attach the code to my original email. The setup python file is now attached.
This sounds like a Py2.6 problem, see here for information on how to use py2exe and wxPython with Py2.6.
http://wiki.wxpython.org/py2exe
Werner
Virgil Stokes wrote:
Werner F. Bruhin wrote:
Hi,
Virgil Stokes wrote:
I have completed my first wxPython program --- a simple Alarm clock (file is attached), which works fine for my purposes.
Python version: 2.6.2
wxPython version: 2.8.10.1
py2exe version: 0.6.9
I have tried two different approaches to create an executable in Windows Vista (a setup.py file for windows and GUI2Exe.py) in Windows Vista --- both have failed.
In both approaches I get an error message during the compilation process:
C:\Python26\lib\site-packages\py2exe\build_exe.py:16: DeprecationWarning: the sets module is deprecated
import sets
This is just a "warning" (which the py2exe dev's have to fix) it does not affect the creation of the exe, at least when I tried it last some time ago.
Yes, this is what I thought also; but, it seems that the compilation
then contains errors.
Are you getting any other error, is the exe generated in the "dist" folder?
No other warnings or errors and yes the *.exe file is generated in the
“dist” directly
If yes, does it run or do you get an error when you try to run it.
It does not execute. The error frame is as follows:
Microsoft Visual C++ Runtime Library
Runtime Error!
Program D:\Python Code Testing\dist\AlarmClock-wxE.exe
R6034
An application has made an attemp to load the C runtime library
incorrectly.
Please contact the application’s support team for more information.
If you get an error, you might want to attach your little application
I did attach the code to my original email. The setup python file is
now attached.
–Thanks Werner
–V
Ok Werner,
I have now confirmed that the problem is either with Python 2.6.2
and/or py2exe (for Python 2.6).
I performed the following steps:
- Installed Python 2.5.1 and Python 2.6.2
- Installed wxPython for Python 2.5 and for Python 2.6 in the
appropriate directories.
- Installed py2exe for Python 2.5 and for Python 2.6 in the
appropriate directories.
I was then able to create a good executable in Python 2.5 but not in
Python 2.6 using the same wxPython code (as in my earlier email).
The message is — I can create executables that use wxPython in
Python 2.5 but not in Python 2.6!
Now, does anyone know how to fix this problem?
–V
Did you look at that link Werner posted? He wrote up the workarounds
necessary to get py2exe + wxPython + Python 2.6 to work there. It all
has to do with the new side-by-side assemblies that were introduced
with 2.6. You need to get the correct dlls and manifests in the right
locations or it won't work.
- Mike
···
On Jul 28, 12:46 pm, Virgil Stokes <v...@it.uu.se> wrote:
Virgil Stokes wrote:Werner F. Bruhin wrote:Hi, Virgil Stokes wrote:I have completed my first wxPython program --- a simple Alarm clock (file is attached), which works fine for my purposes. Python version: 2.6.2 wxPython version: 2.8.10.1 py2exe version: 0.6.9 I have tried two different approaches to create an executable in Windows Vista (a setup.py file for windows and GUI2Exe.py) in Windows Vista --- both have failed. In both approaches I get an error message during the compilation process: C:\Python26\lib\site-packages\py2exe\build_exe.py:16: DeprecationWarning: the sets module is deprecated import setsThis is just a "warning" (which the py2exe dev's have to fix) it does not affect the creation of the exe, at least when I tried it last some time ago.Yes, this is what I thought also; but, it seems that the compilation then contains errors.Are you getting any other error, is the exe generated in the "dist" folder?No other warnings or errors and yes the *.exe file is generated in the "dist" directlyIf yes, does it run or do you get an error when you try to run it.It does not execute. The error frame is as follows:
**************************************************************
Microsoft Visual C++ Runtime Library
Runtime Error!
Program D:\Python Code Testing\dist\AlarmClock-wxE.exe
R6034
An application has made an attemp to load the C runtime library incorrectly.
**************************************************************
Please contact the application's support team for more information.If you get an error, you might want to attach your little applicationI did attach the code to my original email. The setup python file is now attached.
--Thanks Werner
--VOk Werner,
I have now confirmed that the problem is either with Python 2.6.2 and/or py2exe (for Python 2.6).
I performed the following steps:
1) Installed Python 2.5.1 and Python 2.6.2
2) Installed wxPython for Python 2.5 and for Python 2.6 in the appropriate directories.
3) Installed py2exe for Python 2.5 and for Python 2.6 in the appropriate directories.
I was then able to create a good executable in Python 2.5 but not in Python 2.6 using the same wxPython code (as in my earlier email).
The message is ---I can create executables that use wxPython in Python 2.5 but not in Python 2.6!
Now, does anyone know how to fix this problem?
--V
Mike Driscoll wrote:
Virgil Stokes wrote:Werner F. Bruhin wrote:Hi, Virgil Stokes wrote:I have completed my first wxPython program --- a simple Alarm clock (file is attached), which works fine for my purposes. Python version: 2.6.2 wxPython version: 2.8.10.1 py2exe version: 0.6.9 I have tried two different approaches to create an executable in Windows Vista (a setup.py file for windows and GUI2Exe.py) in Windows Vista --- both have failed. In both approaches I get an error message during the compilation process: C:\Python26\lib\site-packages\py2exe\build_exe.py:16: DeprecationWarning: the sets module is deprecated import setsThis is just a "warning" (which the py2exe dev's have to fix) it does not affect the creation of the exe, at least when I tried it last some time ago.Yes, this is what I thought also; but, it seems that the compilation then contains errors.Are you getting any other error, is the exe generated in the "dist" folder?No other warnings or errors and yes the *.exe
file is generated in the "dist" directlyIf yes, does it run or do you get an error when you try to run it.It does not execute. The error frame is as follows:
**************************************************************
Microsoft Visual C++ Runtime Library
Runtime Error!
Program D:\Python Code Testing\dist\AlarmClock-wxE.exe
R6034
An application has made an attemp to load the C runtime library incorrectly.
**************************************************************
Please contact the application's support team for more information.If you get an error, you might want to attach your little applicationI did attach the code to my original email. The setup python file is now attached.
--Thanks Werner
--VOk Werner,
I have now confirmed that the problem is either with Python 2.6.2 and/or py2exe (for Python 2.6).
I performed the following steps:
1) Installed Python 2.5.1 and Python 2.6.2
2) Installed wxPython for Python 2.5 and for Python 2.6 in the appropriate directories.
3) Installed py2exe for Python 2.5 and for Python 2.6 in the appropriate directories.
I was then able to create a good executable in Python 2.5 but not in Python 2.6 using the same wxPython code (as in my earlier email).
The message is ---I can create executables that use wxPython in Python 2.5 but not in Python 2.6!
Now, does anyone know how to fix this problem?
--V
Did you look at that link Werner posted? He wrote up the workarounds
necessary to get py2exe + wxPython + Python 2.6 to work there. It all
has to do with the new side-by-side assemblies that were introduced
with 2.6.
I do not understand what you mean here, Mike. Could you clarify this
and/or expand what you mean my “side-by-side assemblies”
You need to get the correct dlls and manifests in the right
locations or it won't work.
But, what are the correct dlls and manifests (and yes I have tried to
follow what was given in Werner’s email that you mentioned).
Thanks for you interest in the problem, Mike.
–V.
···
v...@it.uu.se
Side-by-Side Assemblies (AKA SxS) are an attempt by Microsoft to reduce dependencies on goofy dlls. Unfortunately, it seems to makes things more complicated, at least in the Python world. You can read up on them here:
http://en.wikipedia.org/wiki/Side-by-side_assembly
http://msdn.microsoft.com/en-us/library/aa376307%28VS.85%29.aspx
The reason Python 2.6 and 3.0 are effected by this mess is that they are now compiled with Visual Studio 2008 on Windows. I found the following article most helpful in getting my head around the problem:
http://www.tejerodgers.com/snippets/2009/why-wxpython-crashes-python-26/
(Note that I couldn’t get it to load just now as it seems their server is down…hopefully it will be up when you read this email though). I haven’t tried creating an executable with 2.6 because it’s so annoying. However, I’m beginning to think I should just so I can document the process myself. I’m sure Werner’s docs are fine (and I plan to use them if I do a tutorial), but sometimes it take reading several tutorials to truly understand the process.
The manifest can be extracted from the Python exe somehow, although I don’t think that’s necessary with the newest release of wxPython. Robin will correct me if I’m wrong, I’m sure. Unless you have some pressing need for 2.6, I’d recommend sticking with 2.5. It’s much more compatible with legacy 3rd party packages than 2.6+ is.
···
On Tue, Jul 28, 2009 at 3:33 PM, Virgil Stokes vs@it.uu.se wrote:
Mike Driscoll wrote:
On Jul 28, 12:46 pm, Virgil Stokes <v...@it.uu.se> wrote:
Virgil Stokes wrote:Werner F. Bruhin wrote:Hi, Virgil Stokes wrote:I have completed my first wxPython program --- a simple Alarm clock (file is attached), which works fine for my purposes. Python version: 2.6.2 wxPython version: 2.8.10.1 py2exe version: 0.6.9 I have tried two different approaches to create an executable in Windows Vista (a setup.py file for windows and GUI2Exe.py) in Windows Vista --- both have failed. In both approaches I get an error message during the compilation process: C:\Python26\lib\site-packages\py2exe\build_exe.py:16: DeprecationWarning: the sets module is deprecated import setsThis is just a "warning" (which the py2exe dev's have to fix) it does not affect the creation of the exe, at least when I tried it last some time ago.Yes, this is what I thought also; but, it seems that the compilation then contains errors.Are you getting any other error, is the exe generated in the "dist" folder?No other warnings or errors and yes the *.exe
file is generated in the "dist" directlyIf yes, does it run or do you get an error when you try to run it.It does not execute. The error frame is as follows:
**************************************************************
Microsoft Visual C++ Runtime Library
Runtime Error!
Program D:\Python Code Testing\dist\AlarmClock-wxE.exe
R6034
An application has made an attemp to load the C runtime library incorrectly.
**************************************************************
Please contact the application's support team for more information.If you get an error, you might want to attach your little applicationI did attach the code to my original email. The setup python file is now attached.
--Thanks Werner
--VOk Werner,
I have now confirmed that the problem is either with Python 2.6.2 and/or py2exe (for Python 2.6).
I performed the following steps:
1) Installed Python 2.5.1 and Python 2.6.2
2) Installed wxPython for Python 2.5 and for Python 2.6 in the appropriate directories.
3) Installed py2exe for Python 2.5 and for Python 2.6 in the appropriate directories.
I was then able to create a good executable in Python 2.5 but not in Python 2.6 using the same wxPython code (as in my earlier email).
The message is ---I can create executables that use wxPython in Python 2.5 but not in Python 2.6!
Now, does anyone know how to fix this problem?
--V
Did you look at that link Werner posted? He wrote up the workarounds
necessary to get py2exe + wxPython + Python 2.6 to work there. It all
has to do with the new side-by-side assemblies that were introduced
with 2.6.
I do not understand what you mean here, Mike. Could you clarify this
and/or expand what you mean my “side-by-side assemblies”
You need to get the correct dlls and manifests in the right
locations or it won't work.
But, what are the correct dlls and manifests (and yes I have tried to
follow what was given in Werner’s email that you mentioned).
Thanks for you interest in the problem, Mike.
–V.
Mike Driscoll
Blog: http://blog.pythonlibrary.org
Mike Driscoll wrote:
Mike Driscoll wrote:
Virgil Stokes wrote:Werner F. Bruhin wrote:Hi, Virgil Stokes wrote:I have completed my first wxPython program --- a simple Alarm clock (file is attached), which works fine for my purposes. Python version: 2.6.2 wxPython version: 2.8.10.1 py2exe version: 0.6.9 I have tried two different approaches to create an executable in Windows Vista (a setup.py file for windows and GUI2Exe.py) in Windows Vista --- both have failed. In both approaches I get an error message during the compilation process: C:\Python26\lib\site-packages\py2exe\build_exe.py:16: DeprecationWarning: the sets module is deprecated import setsThis is just a "warning" (which the py2exe dev's have to fix) it does not affect the creation of the exe, at least when I tried it last some time ago.Yes, this is what I thought also; but, it seems that the compilation then contains errors.Are you getting any other error, is the exe generated in the "dist" folder?No other warnings or errors and yes the *.exe
file is generated in the "dist" directlyIf yes, does it run or do you get an error when you try to run it.It does not execute. The error frame is as follows:
**************************************************************
Microsoft Visual C++ Runtime Library
Runtime Error!
Program D:\Python Code Testing\dist\AlarmClock-wxE.exe
R6034
An application has made an attemp to load the C runtime library incorrectly.
**************************************************************
Please contact the application's support team for more information.If you get an error, you might want to attach your little applicationI did attach the code to my original email. The setup python file is now attached.
--Thanks Werner
--VOk Werner,
I have now confirmed that the problem is either with Python 2.6.2 and/or py2exe (for Python 2.6).
I performed the following steps:
1) Installed Python 2.5.1 and Python 2.6.2
2) Installed wxPython for Python 2.5 and for Python 2.6 in the appropriate directories.
3) Installed py2exe for Python 2.5 and for Python 2.6 in the appropriate directories.
I was then able to create a good executable in Python 2.5 but not in Python 2.6 using the same wxPython code (as in my earlier email).
The message is ---I can create executables that use wxPython in Python 2.5 but not in Python 2.6!
Now, does anyone know how to fix this problem?
--V
Did you look at that link Werner posted? He wrote up the workarounds
necessary to get py2exe + wxPython + Python 2.6 to work there. It all
has to do with the new side-by-side assemblies that were introduced
with 2.6.
I do not understand what you mean here, Mike. Could you clarify this
and/or expand what you mean my “side-by-side assemblies”
You need to get the correct dlls and manifests in the right
locations or it won't work.
But, what are the correct dlls and manifests (and yes I have tried to
follow what was given in Werner’s email that you mentioned).
Thanks for you interest in the problem, Mike.
–V.
Side-by-Side Assemblies (AKA SxS) are an attempt by Microsoft to reduce
dependencies on goofy dlls. Unfortunately, it seems to makes things
more complicated, at least in the Python world. You can read up on them
here:
http://en.wikipedia.org/wiki/Side-by-side_assembly
http://msdn.microsoft.com/en-us/library/aa376307%28VS.85%29.aspx
The reason Python 2.6 and 3.0 are effected by this mess is that they
are now compiled with Visual Studio 2008 on Windows. I found the
following article most helpful in getting my head around the problem:
http://www.tejerodgers.com/snippets/2009/why-wxpython-crashes-python-26/
This seems to be a broken link now.
(Note that I couldn’t get it to load just now as it seems their server
is down…hopefully it will be up when you read this email though). I
haven’t tried creating an executable with 2.6 because it’s so annoying.
However, I’m beginning to think I should just so I can document the
process myself. I’m sure Werner’s docs are fine (and I plan to use them
if I do a tutorial), but sometimes it take reading several tutorials to
truly understand the process.
The manifest can be extracted from the Python exe somehow, although I
don’t think that’s necessary with the newest release of wxPython. Robin
will correct me if I’m wrong, I’m sure. Unless you have some pressing
need for 2.6, I’d recommend sticking with 2.5. It’s much more
compatible with legacy 3rd party packages than 2.6+ is.
Mike Driscoll
Thanks Mike for all this very useful and new (to me) information on
some of the problems when migrating to Python >= 2.6 on a Windows
Vista platform.
I will try to find out more about some of the things that you mentioned.
–V
···
On Tue, Jul 28, 2009 at 3:33 PM, Virgil > Stokes vs@it.uu.se wrote:
On Jul 28, 12:46 pm, Virgil Stokes v...@it.uu.se wrote:
Virgil,
Virgil Stokes wrote:
...
But, what are the correct dlls and manifests (and yes I have tried to follow what was given in Werner's email that you mentioned).
They are listed on the Python 2.6x section on the following wiki page.
http://wiki.wxpython.org/py2exe
Did you adapt your setup.py to copy the dll's to your dist folder, as shown on the above page?
Are you using bundle_files = 3?
Werner
Werner F. Bruhin wrote:
Virgil,
Virgil Stokes wrote:
...
But, what are the correct dlls and manifests (and yes I have tried to follow what was given in Werner's email that you mentioned).
They are listed on the Python 2.6x section on the following wiki page.
Did you adapt your setup.py to copy the dll's to your dist folder, as shown on the above page?
Are you using bundle_files = 3?
No, I was not Thanks again Werner,
I will study your setup.py more carefully, and try again. It is a pity that the process of making an *.exe file is so strongly
tied to MicroSoft when using Python on a Windows Vista platform. Do you
think that this will also be the case for Windows 7?
–V
···
http://wiki.wxpython.org/py2exe
Werner
Virgil,
Virgil Stokes wrote:
Werner F. Bruhin wrote:
Virgil,
Virgil Stokes wrote:
...
But, what are the correct dlls and manifests (and yes I have tried to follow what was given in Werner's email that you mentioned).
They are listed on the Python 2.6x section on the following wiki page.
py2exe - wxPyWiki
Did you adapt your setup.py to copy the dll's to your dist folder, as shown on the above page?
Are you using bundle_files = 3?
No, I was not
Werner
Thanks again Werner,
I will study your setup.py more carefully, and try again.
It is a pity that the process of making an *.exe file is so strongly tied to MicroSoft when using Python on a Windows Vista platform. Do you think that this will also be the case for Windows 7?
Yeap. wxPython/wxWidgets strong point is to be cross platform but at the same time being it retains the specific look and feel on each platform. Therefor it uses as much as possible native widgets on each platform, which means on Windows it will use the windows dll's which provide the different widgets.
Werner