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:
Hi,

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 setup.py file:

from distutils.core import setup
import py2exe

setup(name='test',
zipfile=None,
console=[
{
'script': 'main.py',
}
])

The main.py 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
-C:\temp\dist\main.exe
The following modules appear to be missing
['pkg_resources', 'zope.interface']

Running main.exe gives me an import Error.

C:\temp\dist>main.exe
Traceback (most recent call last):
File "main.py", 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?

Thanks.

--
Hong Yuan

大管家网上建材超市
装修装潢建材一站式购物http://www.homemaster.cn

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

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:

http://xoomer.alice.it/infinity77/main/GUI2Exe.html

Mike
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.