py2exe

How would I combine multiple .py files into one .exe with Py2Exe

北慕城南 提交于 2019-11-28 00:26:57
I used PyQt to make a GUI for my program, but it has multiple .py files, 2 are them are classes, and one launches the code. So I was wondering, how would I combine them into one whole program? Here is a download link to all the .py files I will be combining: http://www.multiupload.com/CJDL639CTH Shed Skin can turn your program into a fast executable, but maybe that doesn't work for your program. With py2exe and a setup.py like this you can easily turn your Python 2.x code in Windows into an executable with only one extra file, unlike cx_Freeze 's flat output of 11 files. For Python 3, use cx

Py2exe - win32api.pyc ImportError DLL load failed

荒凉一梦 提交于 2019-11-27 19:55:44
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 before win32api (in the setup.py for py2exe and in

Getting py2exe to work with zope.interface

跟風遠走 提交于 2019-11-27 18:58:37
问题 I have a Python app based on Twisted and PyGTK. Twisted itself depends on zope.interface, and I don't import it directly. Unfortunately, when I try to run my app, the following error ends up in the error log: Traceback (most recent call last): File "tasks.py", line 4, in <module> File "ui\__init__.pyc", line 14, in <module> File "twisted\python\log.pyc", line 17, in <module> ImportError: No module named zope.interface Traceback (most recent call last): File "tasks.py", line 4, in <module>

How to decompile an exe file compiled by py2exe?

烈酒焚心 提交于 2019-11-27 18:11:52
How to decompile an exe file compiled by py2exe? just one exe file, didn'n have any zip file. how to decompile to pyc or pyo file? You can use unpy2exe to extract the .pyc and then use pyREtic to get the source code. I guess you can read the HOWTO and understand how to use these programs, but basically you go to the location of unpy2exe.py and run: unpy2exe.py [-h] [-o OUTPUT_DIR] [-p PYTHON_VERSION] filename thene go to the location of REpdb.py and run: REpdb.py set_project [new project name] Select the python version fs_um_decompile [location of pyc file] The source should be in ...\Projects

Relative import error with py2exe

自作多情 提交于 2019-11-27 15:30:03
I was trying to generate an executable for a simple Python script. My setup.py code looks like this: from distutils.core import setup import py2exe setup(console=["script.py"]) However, I am getting the error shown in the screenshot. Is there something I could try to fix this? I am using Windows 10. mabe02 It seems that in your mf3.py you are importing beyond the top level . Let's suppose that your project structure is as follows: folder/ main.py mod/ __init__.py components/ __init__.py expander.py language_id.py utilities/ __init__.py functions.py First make sure that main.py refers to the

UnknownTimezoneError Exception Raised with Python Application Compiled with Py2Exe

纵饮孤独 提交于 2019-11-27 14:50:35
问题 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

ImportError: cannot import name RAND_egd

本小妞迷上赌 提交于 2019-11-27 13:55:46
问题 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

py2exe to generate dlls?

孤人 提交于 2019-11-27 13:09:54
问题 Is there a way using py2exe or some other method to generate dll files instead of exe files? I would want to basically create a normal win32 dll with normal functions but these functions would be coded in python instead of c++. 回答1: I think you could solve this by doing some hacking: Take a look at the zipextimporter module in py2exe . It helps with importing pyd-files from a zip. Using that, you might be able to load py2exe's output file in your own app/dll using raw python-api. (Use boost:

Python Windows service pyinstaller executables error 1053

不打扰是莪最后的温柔 提交于 2019-11-27 10:56:11
问题 I have written a Windows service in python. If I run my script from the command prompt python runService.py When I do this the service installs and starts correctly. I have been trying to create an executable using pyinstaller because i've seen the same issue with py2exe. When I run the .exe the service installs but does not start and I get the following error error 1053 the service did not respond to the start or control request in a timely fashion I have seen that many people have had this

Python py2exe window showing (tkinter)

喜你入骨 提交于 2019-11-27 09:45:43
I'm trying to make an exe by py2exe. The program is showing a popup-like window using Tkinter. The problem is, everything works fine when I run the setup like this: setup(windows = [{'script': "msg.py"}], zipfile = None) but it fails when I try to make an one-file exe: setup(windows = [{'script': "msg.py"}], zipfile = None, options = {'py2exe': {'bundle_files': 1, 'compressed': True}}) Actually the final exe runs without problems, but it doesn't display any window. I've read there may be problems with bundle_files=1 at Windows 7, but I also tried bundle_files=2 with the same effect. Here is my