py2exe

py2exe: Compiled Python Windows Application won't run because of DLL

a 夏天 提交于 2019-12-03 03:31:30
I will confess I'm very new to Python and I don't really know what I'm doing yet. Recently I created a very small Windows application using Python 2.6.2 and wxPython 2.8. And it works great; I'm quite pleased with how well it works normally. By normally I mean when I invoke it directly through the Python interpreter, like this: > python myapp.py However, I wanted to go a step further and actually compile this into a standalone executable file. So I followed these instructions from the wxPython wiki which utilize py2exe. At first it gave me errors in the command line, saying MSVCR90.dll was

py2exe - No system module 'pywintypes'

匿名 (未验证) 提交于 2019-12-03 03:05:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to convert a simple Python script into a Windows executable. My setup.py script is: from distutils.core import setup import py2exe setup( name = "Simple Script", options = { "py2exe": { "dll_excludes" : ["libmmd.dll","libifcoremd.dll","libiomp5md.dll","libzmq.dll"] } }, console=['simple_script.py'] ) I have added the dll_excludes as each one of them caused a failure. Now I've hit a failure that I can't simply exlude. This is the error trace: Traceback (most recent call last): File "setup.py", line 12, in <module> console=['rules

py2exe/pyinstaller and DispatchWithEvents

匿名 (未验证) 提交于 2019-12-03 03:03:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a program that uses the win32com library to control iTunes, but have been having some issues getting it to compile into an executable. The problem seems to revolve around using DispatchWithEvents instead of Dispatch . I've created a very simple program to illustrate my problem: import win32com.client win32com.client.gencache.is_readonly = False #From py2exe wiki class ITunesEvents(object): def __init__(self): self.comEnabled = True def OnCOMCallsDisabledEvent(self, reason): self.comEnabled = False def OnCOMCallsEnabledEvent(self):

py2exe + sqlalchemy + sqlite problem

丶灬走出姿态 提交于 2019-12-03 02:49:35
问题 I am playing around with getting some basic stuff to work in Python before i go into full speed dev mode. Here are the specifics: Python 2.5.4 PyQt4 4.4.3 SqlAlchemy 0.5.2 py2exe 0.6.9 setuptools 0.6c9 pysqlite 2.5.1 setup.py: from distutils.core import setup import py2exe setup(windows=[{"script" : "main.py"}], options={"py2exe" : {"includes" : ["sip", "PyQt4.QtSql","sqlite3"],"packages":["sqlite3",]}}) py2exe appears to generate the .exe file correctly, but when i execute dist/main.exe i

ImportError: cannot import name RAND_egd

匿名 (未验证) 提交于 2019-12-03 02:49:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I've tried to create an exe file using py2exe. I've recently updated Python from 2.7.7 to 2.7.10 to be able to work with requests - proxies . Before the update everything worked fine but now, the exe file recently created, raising this error: Traceback (most recent call last): File "puoka_2.py", line 1, in <module> import mLib File "mLib.pyc", line 4, in <module> File "urllib2.pyc", line 94, in <module File "httplib.pyc", line 71, in <module File "socket.pyc", line 68, in <module> ImportError: cannot import name RAND_egd It could be probably

3rd Party Libraries and Py2exe

匿名 (未验证) 提交于 2019-12-03 02:35:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: How would I go about bundling, say, Beautiful soup into an exe along with my code using py2exe? The code I am using for my setup.py right now is from distutils.core import setup import py2exe # equivalent command line with options is: # python setup.py py2exe --compressed --bundle-files=2 --dist-dir="my/dist/dir" --dll-excludes="w9xpopen.exe" options = {'py2exe': { 'compressed':1, 'bundle_files': 1, 'dist_dir': "exe/dist/dir" 'dll_excludes' }} setup(console=[''], options=options,zipfile = None) 回答1: In your options you can add an attribute

Why am I getting this ImportError?

匿名 (未验证) 提交于 2019-12-03 02:33:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a tkinter app that I am compiling to an .exe via py2exe . In the setup file, I have set it to include lxml , urllib , lxml.html , ast , and math . When I run python setup.py py2exe in a CMD console, it compiles fine. I then go to the dist folder It has created, and run the .exe file. When I run the .exe I get this popup window. this http://gyazo.com/02fc6000c94c165a696d5072738c676d.png I then procede to open the Trader.exe.log file, and the the contents say the following; Traceback (most recent call last): File "Trader.py", line 1, in

Py2exe - win32api.pyc ImportError DLL load failed

匿名 (未验证) 提交于 2019-12-03 02:14:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to use py2exe to distribute a python application I have written. Everything seems to go OK, but when I run it on another machine it fails with the following error: Traceback (most recent call last): File "application.py", line 12, in <module> File "win32api.pyc", line 12, in <module> File "win32api.pyc", line 10, in __load ImportError: DLL load failed: The specified procedure could not be found. I have googled for this and not found very much, but have tried the following suggestions to no avail: Imported pywintypes and pythoncom

Error 1053 When Starting Window Service Written In Python

匿名 (未验证) 提交于 2019-12-03 01:46:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I have already looked at and tried the resolutions to this question that others have posted. One user said that to try and change my setup.py file from: from distutils . core import setup import py2exe setup ( console =[ "dev.py" ]) to from distutils . core import setup import py2exe setup ( service =[ "dev.py" ]) I got the following results: running py2exe *** searching for required modules *** Traceback ( most recent call last ): File "C:\Python27\Scripts\distutils-setup.py" , line 5 , in <module> setup ( service =[ "C:\Python27

UnknownTimezoneError Exception Raised with Python Application Compiled with Py2Exe

匿名 (未验证) 提交于 2019-12-03 01:45:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm having a problem distributing an application that utilizes pytz . I'm using Py2Exe to create an executable from my Python source. For a simple example of the problem I'm having, I have: pytz_test.py: import pytz tz_au = pytz.timezone("Australia/Sydney") print tz_au and in setup.py: from distutils.core import setup import py2exe setup(console=['pytz_test.py'], options={"py2exe" : { 'packages': ['pytz'], } }) I then run setup.py: python setup.py py2exe Which compiles the executable. Running the created pytz_test.exe I get: Traceback (most