py2exe

cant get py2exe to work

元气小坏坏 提交于 2019-12-06 08:56:51
for ages now i have been trying to package my python applications up as a stand alone executable. i have been attempting to use py2exe but it has never seemed to work. lets say we have machine A and machine B, i build the program on machine A and try to run as an executable on machine B. on the first few attempts when trying to run on machine B it would say FATAL ERROR: Cannot load python library but i thought that was down to the py2exe process saying 1 missing module full: 1 missing Modules ------------------ ? readline imported from cmd, code, pdb Building 'dist\workinghoursGUI.exe'.

Pygame.mixer module missing?

梦想与她 提交于 2019-12-06 07:59:33
I am trying to make a small program for a friend and it needs to run a .wav file it works fine when i run it in python but when i compile it in py2exe it gives me this --> phone.exe:23: RuntimeWarning: use mixer: DLL load failed: The specified module could not be found. (ImportError: DLL load failed: The specified module could not be found.) Traceback (most recent call last): File "phone.py", line 23, in <module> File "pygame\__init__.pyc", line 70, in __getattr__ NotImplementedError: mixer module not available This might help: an example py2exe project : http://www.pygame.org/wiki/Pygame2exe

Packing a Scrapy application using Cx_freeze or Py2Exe

为君一笑 提交于 2019-12-06 05:51:51
I'm trying to package a web scraping script (built using scrapy) to run as a standalone application for my boss to use. I built a small desktop GUI using Tkinter that calls my Scrapy spiders through an os.system call. My current build implementation (using cx_Freeze) is below. It successfully packages my program into an .exe that works properly on my machine. However, when I try to port it to another Windows machine and run it, the GUI works but the system calls do not. I figure this is because my current approach requires scrapy to be installed on that machine bc it uses a system call, but I

How to correct TCL_LIBRARY and TK_LIBRARY with py2exe

我是研究僧i 提交于 2019-12-06 03:50:48
I made a single slideshow.py file to display some photo correction with Tkinter widget, it runs perfectly on my windows & linux. To made it run on windows without python and tcl installed, I use py2exe to compile it into a win32 executable, setup.py is simple: from distutils.core import setup import py2exe setup(windows=["slideshow.py"]) Then I run "python setup.py py2exe", it generate a "dist" folder in c:\Users\d2xia\ccm_wa\utils\tfps\, and "tcl", "library.zip", "slideshow.exe" and so on under it. When I run slideshow.exe it errors: Traceback (most recent call last): File "slideshow.py",

executable made with py2exe doesn't run on windows xp 32bit

☆樱花仙子☆ 提交于 2019-12-06 02:07:57
问题 I created an executable with py2exe on a 64bit windows 7 machine, and distributed the program. On a windows xp 32bit machine the program refuses to run exhibiting the following behavior: a popup window says: program.exe is not a valid win32 application. The command prompt window says "access denied" I checked for permissions and the user has full control and complete ownership of the file and its parent directories. So that can't be the issue. The only feasible possibility I can image is an

How to build PyQT project?

落花浮王杯 提交于 2019-12-05 23:57:48
问题 I have a simple PyQT project. I would like to know how to build it in Windows in such way, that it becomes runnable executable. I don't want to require user to install heavy QT framework for his computer. How to make executable with only necessary parts of QT? 回答1: I use py2exe for deploying a Windows standalone GUI cross-platform (under Linux, all the python libs are available on the Linux hosts). You run the py2exe "setup" to build an .exe+, and py2exe pulls the binary bits and your python

ImportError: cannot import name Publisher

允我心安 提交于 2019-12-05 19:52:03
问题 I succesfully created an executable version (Py2exe, Pyinstaller) of my application. When I try to run the app from .exe, I get an error as follows in the log file: Traceback (most recent call last): File "CreateAS.pyw", line 8, in <module> ImportError: cannot import name Publisher I am really stuck in this part. Could you help me out? Thanks 回答1: I'm guessing that you are using a version of wxPython that is >= 2.8.11.0 ? If so, the wx.lib.pubsub package has changed. This page describes the

OMP warning when numpy 1.8.0 is packaged with py2exe

岁酱吖の 提交于 2019-12-05 14:43:07
import numpy When I packaged above one line script as a single executable window application using py2exe , I get following warnings upon launch. OMP: Warning #178: Function GetModuleHandleEx failed: OMP: System error #126: The specified module could not be found. This warning happen only when I build as single executable (i.e., only when bundle_files=1). Here's my setup.py for this. from distutils.core import setup import py2exe setup( options = {'py2exe': {'bundle_files': 1}}, windows=['testnumpy.py'], zipfile = None, ) This problem started with numpy 1.8.0. When I revert back to 1.6.2, the

Limit number of class instances with python

为君一笑 提交于 2019-12-05 12:40:52
Μy Mainclass creates a simple QmainWindows like this: class mcManageUiC(QtGui.QMainWindow): def __init__(self): super(mcManageUiC, self).__init__() self.initUI() def initUI(self): self.show() And at the end of my file I launch it like this: def main(): app = QtGui.QApplication(sys.argv) renderManagerVar = mcManageUiC() sys.exit(app.exec_()) if __name__ == '__main__': main() My problem is that each time i source it, it launches a new window. I would like to know if there is a way to detect existence of previous class instance in my script (so that I close the old one or avoid launching a new

convert python programme to windows executable

拈花ヽ惹草 提交于 2019-12-05 07:40:49
i m trying to create windows executable from python program which has GUI . i m using following script from distutils.core import setup import py2exe setup(console=['gui.py']) it gives following error Warning (from warnings module): File "C:\Python27\lib\distutils\dist.py", line 267 warnings.warn(msg) UserWarning: Unknown distribution option: 'console' Traceback (most recent call last): File "E:\my python\py2exe.py", line 3, in <module> import py2exe File "E:\my python\py2exe.py", line 5, in <module> setup(console=['ASUP_finalDone1.py']) File "C:\Python27\lib\distutils\core.py", line 140, in