py2exe

py2exe - No system module 'pywintypes'

梦想的初衷 提交于 2019-12-12 08:23:25
问题 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

Windows services with Python and py2exe

孤街醉人 提交于 2019-12-12 05:58:15
问题 I need some help with converting a python windows service using py2exe. Let me explain the problem. I have a python service, which works, no problems here. I used py2exe to turn it into an executable file. I tested it by replacing the python version of the service with this one and it works with no problems too. But when I move the exe version of the service to another computer, it will register with the service manager but won't start with the error: "The system cannot find the file

No module named py2exe

本秂侑毒 提交于 2019-12-12 04:47:52
问题 I've been trying to use py2exe on a completed script for a while now, but it appears something is not going right with my py2exe installation. Importing py2exe fails. Here's the output in the Python Shell: Traceback (most recent call last): File "<pyshell#0>", line 1, in <module> import py2exe ImportError: No module named py2exe I've checked here, and apparently there should be a folder named py2exe in C:\Python27\Lib\site-packages\ . There is not. I've tried uninstalling/reinstalling a few

Windows “open with” python py2exe application

…衆ロ難τιáo~ 提交于 2019-12-12 03:56:49
问题 I wonder how the Windows "Open file with..." feature works. Or rather, how would do if I write a program in python, compile a executable with py2exe and then want to be able to open certain files in that program by right-clicking and choose it in "Open with". Is the file simply passed as an argument, like "CMD>C:/myapp.exe file"? 回答1: Yep, the path to the file gets passed in as an argument and can be accessed via sys.argv[1] . 回答2: You can use more functionally argparse module 来源: https:/

How do you include subprocess with py2exe?

孤人 提交于 2019-12-12 03:35:55
问题 When I package my program into an exe using py2exe and try to run it, it comes back with the following: Traceback (most recent call last): File "raman_utility_v1.0.2.pyw", line 386, in <module> File "raman_utility_v1.0.2.pyw", line 132, in __init__ File "raman_utility_v1.0.2.pyw", line 136, in getHome File "subprocess.pyc", line 566, in check_output File "subprocess.pyc", line 710, in __init__ File "subprocess.pyc", line 958, in _execute_child WindowsError: [Error 2] The system cannot find

Can't run python script converted to exe

廉价感情. 提交于 2019-12-12 03:23:56
问题 I have created a python program that sends data to google spreadsheets using the following external libaries: json gspread oauth2client The program works as expected, however when I tried to convert it to an executable, I would get the following error every time I rune the .exe file: Traceback (most recent call last): File "C:\Python27\lib\site-packages\cx_Freeze\initscripts\Console.py", line 27, in <module> exec(code, m.__dict__) File "Demo.py", line 13, in <module> File "C:\Python27\lib

Py2Exe, Sqlite - Not a valid Win 32 Application

自闭症网瘾萝莉.ら 提交于 2019-12-12 01:49:40
问题 I have a Python program that I am attempting to package using Py2Exe. I am using Python 3.4. My program uses Sqlachemy and Sqlite3 in order to create and access the database. When I install the resulting files from Py2Exe I get the dll error: Sqlite is not a valid Win32 application I have attempted to go through the various work-arounds listed here, including uninstall python and re-installing all modules to ensure that I have only the 32 bit versions. Any ideas? My setup.py code is listed

Help with py2exe error

放肆的年华 提交于 2019-12-12 01:36:26
问题 I'm trying to compile to an exe my script of python, but I'm getting an error that I'm not know how to resolve... my script include this libraries import pyHook import pythoncom import time import win32com.client and the py2exe script is from distutils.core import setup import py2exe import sys sys.argv.append('py2exe') setup( options = {'py2exe': dict(bundle_files=1, optimize=1)}, console = ["login.macro.py"], zipfile = None, ) and I'm getting the error Traceback (most recent call last):

Using pygame2exe and having font issue with sysfont/.ttf

夙愿已清 提交于 2019-12-11 22:56:24
问题 I tried py2exe , cx_freeze and got nowhere with those even using this site, made some progress with pygame2exe . I read the two or three other posts dealing with this, but despite having my setup file the same as instructed, and also putting in the freesansbold.ttf I still get the ' has requested the runtime to terminate in an unusual way ' error. I will go into some details, but what is strange is if I set my text to a standard thing like "Arial" like was suggested here (Pygame Distribution

py2exe “requests” module missing

陌路散爱 提交于 2019-12-11 21:17:14
问题 I don't know why I can't import package requests . If I execute the script that needs requests library, it crashes obviously. Web of requests library: http://docs.python-requests.org/en/latest/ Version Py2exe 0.9.2.2 Version Python 3.4.3 I tried to use other options of py2exe as like -i requests I've even tried using the setup.py form, but I can't make it work. py -3.4 -m py2exe.build_exe script.py --bundle-files 3 24 missing Modules ------------------ ? Cookie imported from requests.compat ?