py2exe

Building executables for Python 3 and PyQt

♀尐吖头ヾ 提交于 2019-11-29 02:36:50
问题 I built a rather simple application in Python 3.1 using PyQt4. Being done, I want the application to be distributed to computers without either of those installed. I almost exclusively care about Windows platforms, so my goal is to have a single executable file and maybe some resource files and .dlls in the end. Having searched around, I came to the conclusion that py2exe only supports Python up to version 2.7 pyinstaller only supports Python up to version 2.6 cx_Freeze does not work for me

How to package Twisted program with py2exe?

戏子无情 提交于 2019-11-28 23:41:50
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. I've seen this before... py2exe, for some reason, is not detecting that these modules are needed inside the ZIP archive and is leaving them out.

ImportError: cannot import name RAND_egd

蹲街弑〆低调 提交于 2019-11-28 21:31:59
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 repaired by changing options in setup.py file but I

将发送邮件的python代码用py2exe编译成exe文件遇到问题的解决方法

我们两清 提交于 2019-11-28 18:02:45
将发送邮件的python代码用py2exe编译成exe文件遇到问题的解决方法 问题描述: 以下代码为发送邮件的python源码,源码执行ok,但当用py2exe编译成exe文件后,执行,报错如下: 解决方法: 注意:要在dos命令行下执行生成后的exe文件,这样会显示报错信息!! 问题延伸: 一些模块如email的__init__.py 为了确保和一些早期版本的兼容,它不能够自动处理包加载,因此需要手动加载。 以下模块可能会遇到相同的问题: ['FCNTL', 'OpenSSL', 'email.Generator', 'email.Iterators', 'email.Utils', 'pkg_resources', 'pywintypes', 'resource', 'win32api', 'win32con', 'win32event', 'win32file', 'win32pipe', 'win32process', 'win32security'] 发送邮件的python源码 # -*- coding: utf8 -*- ''' Created on 2012-9-10 @author : duxuefeng ''' import smtplib from email.MIMEText import MIMEText from email.Header import

Python Windows service pyinstaller executables error 1053

别等时光非礼了梦想. 提交于 2019-11-28 17:56:51
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 issue but I can't seem to find a definitive answer as to how to fix this. winservice.py from os.path

Trying to use py2exe, but python is not recognized

半腔热情 提交于 2019-11-28 12:17:04
问题 I am following the the tutorial at http://www.py2exe.org/index.cgi/Tutorial to figure out how to use py2exe. I get down to step 3 where you are supposed to run the command: python setup.py py2exe I do that and then I get this error: 'python' is not recognized as an internal or external command, operable program or batch file. I have python 2.4 installed on my machine. any idea's? I am sure it is something simple. 回答1: Python just isn't on your path. If you indeed have Python 2.4, it should be

Py2Exe “Missing Modules”

試著忘記壹切 提交于 2019-11-28 12:08:19
I'm trying to convert my python project into an exe using Py2Exe. It is worth noting that cx_freeze complains about the same three "missing modules", along with several dozen others. The problem is, no one anywhere tells how to resolve this. I'm building on MS Windows XP 32-bit (VirtualBox). C:\Documents and Settings\Jason\Desktop\redstring2>python setup.py py2exe running py2exe running build_py creating build creating build\lib copying redstring.py -> build\lib 3 missing Modules ------------------ ? readline imported from cmd, code, pdb ? win32api imported from platform ? win32con imported

py2exe “include” modules: when should they be managed manually?

余生长醉 提交于 2019-11-28 11:25:11
When is it necessary to specify modules to include? Doesn't py2exe search and include whatever is needed per: http://www.py2exe.org/index.cgi/FAQ ? And why does it include modules that are not being used, such as ["Tkconstants", "Tkinter", "tcl", "wx"] (I'm using Qt, but have wx installed on my PC) that then need to be excluded? py2exe tries to create a graph of all the dependencies, starting with your entry point script. It can't always get it 100% correct, which is why you are provided the includes and excludes options to fine tune the package. Refer to options here: http://www.py2exe.org

Python - how can i hide the windows command prompt screen when the script is running?

你说的曾经没有我的故事 提交于 2019-11-28 11:03:27
问题 How can i remove this black command prompt screen from the desktop when my python script is running? I made the service.py script into exe using python 2 exe. All worked fine but when the .exe is running i have a fixed command prompt which i do not want to show. service.py: #!/usr/bin/env python import os import ctypes from subprocess import Popen, PIPE def Mbox(title, text, style): ctypes.windll.user32.MessageBoxA(0, text, title, style) python_check = os.path.exists("C:/Python27/python.exe")

Opening an EXE of my Pygame program gives me import errors

无人久伴 提交于 2019-11-28 09:31:17
I made an MP3 player with pygame code: from Tkinter import * import pygame import glob import tkFont songs=[] for x in glob.glob('C:\WhaleTunes\Downloaded/*mp3'): songs.append(x) Admin=Tk() num=0 plpa=-1 songas=Label(Admin,text='',bg='red') songas.place(relx=0.0,rely=0.7) def play(number): pygame.mixer.music.unpause() pygame.mixer.music.load(songs[number]) pygame.mixer.music.play() songas.configure(text=songs[number]) def pause(): pygame.mixer.music.pause() def Pre(): global num if num == 0: z = len(songs) num=z num+=1 num-=1 play(num) def Next(): global num num+=1 play(num) #init pygame mixer