Hi, hoping this place is ok to ask a question about gui2exe
I used the really great gui2exe program to prepare python code for
distribution, and it just worked fine.
Till I started to use pubsub (after some tips on this forum): now the
exe will not run anymore.
I did the following "to archieve" the problem with the exe to run: 1)
install the pubsub stuff, 2) in two modules I wrote: from pubsub
import pub.
In WingIDE the code just runs just fine.
However the exe produced by Gui2Exe states (LOG FILE) states:
Traceback (most recent call last):
File "mainwin122.py", line 2, in <module>
File "pubsub\pub.pyc", line 27, in <module>
File "pubsub\core\pubsub3.pyc", line 21, in <module>
File "pubsub\core\listener.pyc", line 13, in <module>
ImportError: No module named listenerimpl
Traceback (most recent call last):
File "mainwin122.py", line 2, in <module>
File "pubsub\pub.pyc", line 27, in <module>
File "pubsub\core\pubsub3.pyc", line 21, in <module>
File "pubsub\core\listener.pyc", line 13, in <module>
ImportError: No module named listenerimpl
Traceback (most recent call last):
File "mainwin122.py", line 2, in <module>
File "pubsub\pub.pyc", line 27, in <module>
File "pubsub\core\pubsub3.pyc", line 21, in <module>
File "pubsub\core\listener.pyc", line 13, in <module>
ImportError: No module named listenerimpl
Traceback (most recent call last):
File "mainwin122.py", line 2, in <module>
File "pubsub\pub.pyc", line 27, in <module>
File "pubsub\core\pubsub3.pyc", line 21, in <module>
File "pubsub\core\listener.pyc", line 13, in <module>
ImportError: No module named listenerimpl
Unfamiliar with the interface of gui2exe as I am I included all *.pyc
files in the "python module" fields in gui2exe (3 entries). Now
gui2exe will not produce an exe but creates a long list of errors,
first being ctypes_com_server etc.
And from full build output dialog:
running py2exe
creating E:\___python.excel\mainwin\build
creating E:\___python.excel\mainwin\build\bdist.win32
creating E:\___python.excel\mainwin\build\bdist.win32\winexe
creating E:\___python.excel\mainwin\build\bdist.win32\winexe
\collect-2.6
creating E:\___python.excel\mainwin\build\bdist.win32\winexe
\bundle-2.6
creating E:\___python.excel\mainwin\build\bdist.win32\winexe\temp
*** searching for required modules ***
C:\Python26\lib\site-packages\py2exe\build_exe.py:16:
DeprecationWarning: the sets module is deprecated
import sets
Traceback (most recent call last):
File "E:\___python.excel\mainwin\tmpb0rqrx.py", line 106, in
<module>
ctypes_com_server = []
File "C:\Python26\lib\distutils\core.py", line 152, in setup
dist.run_commands()
File "C:\Python26\lib\distutils\dist.py", line 975, in run_commands
self.run_command(cmd)
File "C:\Python26\lib\distutils\dist.py", line 995, in run_command
cmd_obj.run()
File "C:\Python26\lib\site-packages\py2exe\build_exe.py", line 243,
in run
self._run()
File "C:\Python26\lib\site-packages\py2exe\build_exe.py", line 296,
in _run
self.find_needed_modules(mf, required_files, required_modules)
File "C:\Python26\lib\site-packages\py2exe\build_exe.py", line 1297,
in find_needed_modules
mf.import_hook(mod)
File "C:\Python26\lib\site-packages\py2exe\mf.py", line 719, in
import_hook
return Base.import_hook(self,name,caller,fromlist,level)
File "C:\Python26\lib\site-packages\py2exe\mf.py", line 136, in
import_hook
q, tail = self.find_head_package(parent, name)
File "C:\Python26\lib\site-packages\py2exe\mf.py", line 204, in
find_head_package
raise ImportError, "No module named " + qname
ImportError: No module named C:\Python26\Lib\site-packages\pubsub\pub
So what should I do?
Are there option to get gui2exe working with pubsub or should I just
remove the pubsub code, waiting for the next release. For sure I don't
want to stop using gui2exe, because although the hint over windows are
really annoying and disfunctional, the rest of the program is just
superb!!
Tia Samuel