Differences between revisions 2 and 3
Revision 2 as of 2005-07-04 00:07:38
Size: 552
Editor: grossac
Comment:
Revision 3 as of 2007-04-17 10:51:20
Size: 1044
Comment: 2nd solution to the same problem
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
Line 9: Line 8:
}}}    }}}
Line 20: Line 17:
Line 23: Line 19:
Line 25: Line 20:
I found this tips here : [http://nerdierthanthou.nfshost.com/2005/03/image-resizer.html] I found this tips here : http://nerdierthanthou.nfshost.com/2005/03/image-resizer.html
Line 28: Line 23:

=== Another Solution to the same problem: ===
{{{
from distutils.core import setup
import py2exe
setup(windows=[{"script":"main.py"}], options={"py2exe":{"includes":["sip"]}})
}}}
I found that on the web, unfortunately don't know anymore where, but it also works for me!

Obviously is the second part only a way to get the " --includes sip" parameter directly into the script, but the use of "windows" instead of "console" doesn't open a console window, but immediately a Qt window in my case.

Error message

  File "form1.pyc", line 11, in ?
  File "qt.pyc", line 9, in ?
  File "qt.pyc", line 7, in __load
ImportError: No module named sip

Solution

python setup.py py2exe --includes sip

setup.py

   1 from py2exe.build_exe import py2exe
   2 from distutils.core import setup
   3 setup( console=[{"script": "main.py"}] )

Reference

I found this tips here : http://nerdierthanthou.nfshost.com/2005/03/image-resizer.html

There is a full code sample.

Another Solution to the same problem:

from distutils.core import setup
import py2exe
setup(windows=[{"script":"main.py"}], options={"py2exe":{"includes":["sip"]}})

I found that on the web, unfortunately don't know anymore where, but it also works for me!

Obviously is the second part only a way to get the " --includes sip" parameter directly into the script, but the use of "windows" instead of "console" doesn't open a console window, but immediately a Qt window in my case.

Py2exeAndPyQt (last edited 2011-10-16 21:42:58 by MircoAckermann)