473,657 Members | 2,348 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Re: Py2exe and name space package

On Jun 10, 4:28 am, "Yuan HOng" <hongyuan1...@g mail.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='tes t',
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\py2ex e\run.exe
-C:\temp\dist\ma in.exe
The following modules appear to be missing
['pkg_resources' , 'zope.interface ']

Running main.exe gives me an import Error.

C:\temp\dist>ma in.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
0 920

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

20
3685
by: Thomas Heller | last post by:
I'm currently working on a new version of py2exe, which will require Python 2.3 and later, because it uses the zipimport mechanism. Since py2exe is a distutils extension, and since C compilers are commonly available on most platforms except Windows, it would be fairly easy to let py2exe generate a C source file installing this import hook, and let distutils' C compiler build an executable file from this. Would this be useful, or would...
2
17672
by: x-herbert | last post by:
Hi, I have a small test to "compile" al litle script as a WMI-Tester. The script include a wmi-wrapper and "insert" the Win32-modeles. here the code: my "WMI-Tester.py" ----- import wmi
3
3635
by: ulysses | last post by:
hi. I use python 23,py2exe 0.4.3 ,wxpython do my py app in win32. I use gettext to support multi languages. I build a small fuction for load language at top of main module. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ def setLan(lan): import gettext langs = gettext.GNUTranslations(open (join ( localPath, ( "lan/"+lan+".mo" ) )
4
4003
by: bwaha | last post by:
First time trying to create an executable with py2exe. I have a small program which makes use of python23 (2.3.5?), wxpython ('2.6.2.1'), matplotlib ('0.83.2'), win32com (latest?), Numeric ('23.7') on Windows XP & Win2000. The program runs without problem but as an exe it doesn't even get to showing the GUI. I get the following error log when I run the executable. Traceback (most recent call last): File "mpival3.py", line 1264, in ?
0
1619
by: jantod | last post by:
I am trying to package my application with py2exe. Unfortunately it uses both scipy/numpy and numarray so I'm having to jump through a lot of hoops to get it going. I'm getting problems packaging an app that uses only scipy. See below. Thanks! Janto ===setup.py=== from distutils.core import setup
3
4712
by: vajratkarviraj | last post by:
i hav python2.5, matplotlib0.90.1, and py2exe for python 2.5 all on windows xp... i hav a python program(letsc.py) which uses the matplotlib package... and i want 2 make an exe of it for distribution on other comps... i used py2exe... i wrote a setup.py whose contents are : from distutils.core import setup import py2exe import matplotlib setup(console=, options={ 'py2exe': { 'packages' : ,
5
2021
by: Doug Morse | last post by:
Hi, I have an application that runs just fine using the standard Python distro interpreter (v2.5.1 on WinXP) but throws the following exception when run as an executable built with py2exe. My questions are: (a) does anyone have any thoughts on why this exception is occurring and what to do about it, and (b) more generally, why would a problem like this occur under py2exe but not with the standard distro? Thanks in adavance for any...
3
4434
by: MyPetSlug | last post by:
Hello Guys, Using Pythong 2.4 and py2exe 0.6.6. So, I've created a wxPython application that I use for testing. The idea is to have a tests directory so that every time the application starts, it looks in the directory and loads the tests it sees into a list it uses during runtime. So, I've got this working fine on my machine locally, but now I'm trying to get it working right with py2exe. My problem is, if I include my 'tests" package in...
0
3109
by: Jimmy Retzlaff | last post by:
py2exe 0.6.9 released ===================== py2exe is a Python distutils extension which converts Python scripts into executable Windows programs, able to run without requiring a Python installation. Console and Windows (GUI) applications, Windows NT services, exe and dll COM servers are supported. Changes in 0.6.9:
0
8399
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8732
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8504
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8606
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6169
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4159
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4318
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2732
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1959
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.