py2exe

fatal python error pygame parachute

早过忘川 提交于 2019-12-31 05:28:07
问题 I have written a small program in WindowsXP-python-pygame. It runs fine when I run it in the dos. Then, I tried to create a windows executable using py2exe. .exe was created without any issue. Initially on running the executable, I got a NotImplemented error which went away after I copied some dll files from pygame folder to the dist folder. Now I am getting a new error. It reads: "Fatal Python error: (pygame parachute) Segmentation Fault This application has requested the Runtime to

dll load errors in python executable made from pywin32

别等时光非礼了梦想. 提交于 2019-12-31 02:50:15
问题 I created python executables with py2exe with both 64bit python interpreter and 32 bit python interpreter. In my program, I use the module pywin32 com , and so I dl'ed and installed both the 64bit and 32bit versions of the program prior to creating the executable. The 64bit exe works fine, but the 32 bit one has the following problem: Traceback (most recent call last): File "program.py", line 11, in <module> File "win32com\__init__.pyc", line 5, in <module> File "win32api.pyc", line 12, in

Including PYDs/DLLs in py2exe builds

让人想犯罪 __ 提交于 2019-12-30 17:25:49
问题 One of the modules for my app uses functions from a .pyd file. There's an option to exclude dlls (exclude_dlls) but is there one for including them? The build process doesn't seem to be copying the .pyd in my module despite copying the rest of the files (.py). I also need to include a .dll. How do I get py2exe to include both .pyd and .dll files? 回答1: .pyd's and .DLL's are different here, in that a .pyd ought to be automatically found by modulefinder and so included (as long as you have the

python打包方法

◇◆丶佛笑我妖孽 提交于 2019-12-29 16:30:21
一、简介 py2exe是一个将python脚本转换成windows上的可独立执行的可执行程序(*.exe)的工具,这样,你就可以不用装python而在windows系统上运行这个可执行程序。 py2exe已经被用于创建wxPython,Tkinter,Pmw,PyGTK,pygame,win32com client和server,和其它的独立程序。py2exe是发布在开源许可证下的。 二、安装py2exe 从http://prdownloads.sourceforge.net/py2exe下载并运行与你所安装的Python对应的py2exe版本的 installer,这将安装py2exe和相应的例子;这些例子被安装在lib\site-packages\py2exe\samples目录下。 三、py2exe的用法 如果你有一个名为myscript.py的python脚本,你想把它转换为运行在windows上的可执行程序,并运行在没有安装python的 windows系统上,那么首先你应写一个用于发布程序的设置脚本例如mysetup.py,在其中的setup函数前插入语句import py2exe 。 mysetup.py示例如下: # mysetup.py from distutils.core import setup import py2exe setup(console=[

How to package Twisted program with py2exe?

一个人想着一个人 提交于 2019-12-29 04:44:06
问题 I tried to package a Twisted program with py2exe, but once I run the exe file I built, I got a "No module named resource" error. And I found the py2exe said: The following modules appear to be missing ['FCNTL', 'OpenSSL', 'email.Generator', 'email.Iterators', 'email.Utils', 'pkg_resources', 'pywintypes', 'resource', 'win32api', 'win32con', 'win32event', 'win32file', 'win32pipe', 'win32process', 'win32security'] So how do I solve this problem? Thanks. 回答1: I've seen this before... py2exe, for

Outputed py2exe exe won't run only when signed: ImportError

橙三吉。 提交于 2019-12-29 01:47:35
问题 So, I've got a program I made in python 2.6, it ran fine as normal python, and ran fine when made into an exe via py2exe v0.6.9. I used signtool to sign it, having changed nothing else, and it stops working. When I run the signed exe, I receive an "ImportError: No module named os" from line 1 of my script. I did some digging and found this: http://osdir.com/ml/python.py2exe/2008-04/msg00031.html, which seems to be a very close description of my problem. I manually applied the patch linked to

多Python版本共存

倖福魔咒の 提交于 2019-12-28 16:07:38
Python 3.4 和 3.7 共存 我的电脑上同时安装了 Python 3.4 和 Python 3.7 两个 Python 版本。现在打开终端窗口进入指定的版本。 py -3.4 py -3.7py -2.7 在终端窗口输入 py -3.4 回车进入 Python 3.4 版本。Python 3.7 和 Python 2.7 同理。 同理,Python 3.7.5 和 Python 3.7.6 只需输入 py -3.7.5 或 py -3.7.6 。 使用不同版本的 pip 进行安装。例如使用 Python 3.4 安装 py2exe。 py -3.4 -m pip install py2exe 在 py 文件中指定使用的 Python 版本只需在文件开头输入。 #! python3.7 #! python3.4 或者修改文件 python.exe 的文件名。例如将 Python 3.7 版本的 python.exe 文件名改成 python37.exe,Python 3.4 版本的改成 python34.exe,其余的同理。 进入终端窗口输入 python37 回车即可进入 Python 3.7 版本,输入 python34 回车即可进入 Python 3.4 版本,其余版本同理。 输入 python34 -m pip install py2exe 使用 Python 3

Make a py2exe exe run without a console?

瘦欲@ 提交于 2019-12-28 02:52:27
问题 Does anyone know how to make an exe with py2exe run without the black console? and bundle up all the pyd files etc into just one exe file? 回答1: For one exe file, use this setup (taken from this answer): from distutils.core import setup import py2exe, sys, os sys.argv.append('py2exe') setup( options = {'py2exe': {'bundle_files': 1, 'compressed': True}}, windows = [{'script': "single.py"}], zipfile = None, ) 回答2: from distutils.core import setup import py2exe, sys, os sys.argv.append('py2exe')

Enabling JPEG support for QImage in py2exe-compiled Python scripts?

拜拜、爱过 提交于 2019-12-28 01:00:33
问题 I'm trying to use a JPEG image in a QImage object from a Python script, with PyQt4. The script itself works perfectly, the image loads and can be manipulated and rendered and all. However, when I try to "compile" this script with py2exe, everything works but the JPEG image. Replacing it with a PNG equivalent works, but since my program downloads images from the web, they won't always be in PNG format and I can't afford converting them all with another library. I've discovered that JPEG image

python GUI to EXE with image and modules

六月ゝ 毕业季﹏ 提交于 2019-12-25 12:10:00
问题 I have created a Python GUI and trying to convert it to .exe with py2exe. i am using following modules wx,matplotlib,numpy,time,serial,random and a .ico image as logo. i tried create a setup.py file but it didn't work.need help creating setup file to generate .exe of my GUI. 回答1: It would be convenient if you could provide some details regarding why the .EXE is not being created. If you can't provide the details then please go through these questions on Stackoverflow, they maybe helpful: How