By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,345 Members | 1,758 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,345 IT Pros & Developers. It's quick & easy.

Re: Py2exe and name space package

P: n/a
On Jun 10, 4:28 am, "Yuan HOng" <hongyuan1...@gmail.comwrote:

I used to freeze my application into Windows executibles using py2exe.
Lately I started using several zope packages in my application, like
zope.interface. Now the freezed program can't run properly. Like the
following example shows:

My file:

from distutils.core import setup
import py2exe

'script': '',

The test code:

from zope.interface import Interface
print Interface

During the freezing process, the following warning is shown:

*** copy dlls ***
copying c:\Python25\lib\site-packages\py2exe-0.6.6-py2.5-win32.egg\py2exe\run.exe
The following modules appear to be missing
['pkg_resources', 'zope.interface']

Running main.exe gives me an import Error.

Traceback (most recent call last):
File "", line 1, in <module>
ImportError: No module named interface

What should I do to make py2exe recognize and include zope.interface
in the binary distribution?


Hong Yuan


I include the lxml package in some of my programs and I do so by
adding the following to the

packages = ['lxml']

However, I'm not sure if what you want to add is truly a package.
Yours might go into the "includes" directive. Currently, I use the
GUI2Exe wrapper for py2exe as I find it easier to make complex
executables. You can find it here:

Jun 27 '08 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.