cx-freeze

NameError: name 'exit' is not defined

我只是一个虾纸丫 提交于 2020-08-17 23:49:23
问题 I used cxfreeze to create a Windows executable from planrequest.py. It seemed to work ok, but when I run the exe file I get NameError: name 'exit' is not defined name exit is not defined in python states that the fix is to use import sys . However, I use import sys. The code runs fine as a python script (as in, I extensively tested the command line arguments before compiling to an executable.) import socket import sys if len(sys.argv) == 1: print("Usage:") print("PlanRequest [Request String]

Unable to compile with cx_freeze and PySide2

倖福魔咒の 提交于 2020-07-22 05:01:12
问题 I have a python program I'm trying to compile with cx_freeze. The GUI I'm using is PySide2. I've tried including PySide2, here is excluding it, but I keep getting the same error. Below is my setup.py code from cx_Freeze import setup, Executable import sys includefiles = ['README.md', 'debug.log','tcl86t.dll', 'tk86t.dll', 'field.jpg', 'inputClass.py', 'mainfile.qml', 'MyTabView.qml', 'PlayerSelection.qml', 'selectedPlayers.py', 'Settings.qml', 'SimOutput.qml', 'simulationOutput.py'] includes

Unable to compile with cx_freeze and PySide2

ε祈祈猫儿з 提交于 2020-07-22 05:01:05
问题 I have a python program I'm trying to compile with cx_freeze. The GUI I'm using is PySide2. I've tried including PySide2, here is excluding it, but I keep getting the same error. Below is my setup.py code from cx_Freeze import setup, Executable import sys includefiles = ['README.md', 'debug.log','tcl86t.dll', 'tk86t.dll', 'field.jpg', 'inputClass.py', 'mainfile.qml', 'MyTabView.qml', 'PlayerSelection.qml', 'selectedPlayers.py', 'Settings.qml', 'SimOutput.qml', 'simulationOutput.py'] includes

Minimal set of files required to distribute an embed-Cython-compiled code and make it work on any machine

不羁的心 提交于 2020-06-30 10:19:06
问题 TL;DR: how to use Cython as a distribution method instead of Py2exe, cx_freeze, pyinstaller, etc. Following Making an executable in Cython, I'd like to see how it could be possible to distribute a Python program to any Windows user (who doesn't have Python already installed on his machine) by compiling it first with Cython --embed . Let's use a test.py : import json print(json.dumps({'key': 'hello world'})) and compile it: cython test.py --embed call "C:\Program Files (x86)\Microsoft Visual

Exe built with cx_Freeze shows error when containing pysftp import

主宰稳场 提交于 2020-06-28 09:38:11
问题 I am trying to compile an executable from a python script that uses pysftp. I'm using cx_Freeze to do that. Here is my code: Test.py import datetime import time import os import pysftp i = 0 while(i<10): tm = datetime.datetime.now() print (tm.strftime('%H:%M:%S')) time.sleep(1) i += 1 Here is the setup: setup.py from cx_Freeze import setup, Executable base = None executables = [Executable("Test.py", base=base)] packages = ["idna", "datetime", "time", "os", "pysftp"] options = { 'build_exe': {