cx-freeze

Command prompt disappears with cx_freeze

拈花ヽ惹草 提交于 2019-12-24 10:45:54
问题 I am brand new to using cx_freeze for compiling Python files. I am trying to compile my program into an exe, and I need two txt files to go along with it. I am using this as my setup.py code: from cx_Freeze import setup, Executable includesfiles = ['textone.txt', 'texttwo.txt'] includes = [] excludes = [] packages = [] setup( name = "Program", version = "0.1", description = "A fun game.", author = "author", options = {'build_exe': {'excludes':excludes,'packages':packages,'include_files'

Excluding undesired .dll import from PyQt5 while creating an executable with cx_freeze under Python 3.6

北城以北 提交于 2019-12-24 10:11:44
问题 I do have one question regarding PyQt5 and cx_freeze, and I hope you can help me. I would like to know if there is a way to exclude undesired .dll import from PyQt5 library while creating an executable with cx_freeze. This request comes from the fact that when I create my executable with cx_freeze the whole PyQt5 library is imported resulting in a quite heavy application (~220 Mb). In my cx_freeze setup.py I have coded the following: import sys from setuptools import setup, find_packages from

pyqt application lost icon after packaged by cx_freeze [duplicate]

橙三吉。 提交于 2019-12-24 03:17:43
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: Images not showing when running a frozen pyqt app on another computer I have a pyqt application whose icon is in a resource file. I can see the icon when run the application using python app.py. But after I package the application using cx_freeze, the icon is missing. I can see the compiled resource in the `library.zip' (generated by cx_freeze), but the icon is still missing. Any one can help? Thanks. 回答1: I had

Permission to overwrite files

三世轮回 提交于 2019-12-24 03:14:29
问题 I have a python program which I then compile with cx_freeze that updates itself by downloading a zip file and then overwriting files. Thing is, whenever I execute it, this happens: Traceback (most recent call last): File ".\updater.py", line 69, in empezar_actualizacion self.bajar_archivos() File ".\updater.py", line 75, in bajar_archivos self.extraer_archivos() File ".\updater.py", line 80, in extraer_archivos self.descarga.descomprimir(self.archivos) File "utils.py", line 167, in

cx_Freeze - opencv compatibility

我们两清 提交于 2019-12-24 02:26:22
问题 I get a numpy.core.multiarray failed to import error whenever I try to build an exe file using cx_Freeze. My system uses the following versions: python 3.6.0 opencv 3.3.0 numpy 1.13.1 cx_Freeze 5.0 The code is: import cv2 i=333 print(i) It runs fine (i.e. builds a good exe file) only if I remove the import cv2 line. Is there any incompatibility between the four modules I listed? 回答1: I managed to make this work only after I uninstalled cx_Freeze and installed Pyinstaller instead. It works

cx_Freeze - opencv compatibility

回眸只為那壹抹淺笑 提交于 2019-12-24 02:26:14
问题 I get a numpy.core.multiarray failed to import error whenever I try to build an exe file using cx_Freeze. My system uses the following versions: python 3.6.0 opencv 3.3.0 numpy 1.13.1 cx_Freeze 5.0 The code is: import cv2 i=333 print(i) It runs fine (i.e. builds a good exe file) only if I remove the import cv2 line. Is there any incompatibility between the four modules I listed? 回答1: I managed to make this work only after I uninstalled cx_Freeze and installed Pyinstaller instead. It works

Importing wrong packages when calling a python script from another python script via subprocess

旧街凉风 提交于 2019-12-24 01:54:35
问题 I am trying to automate executable creation for my program in 32 and 64bit with cx_Freeze. I have two separate python 3.4 installations (32 and 64 bit) with all required packages, which all correspond to their appropriate architectures. However, when I execute the script that calls the different python installations via subprocess, the called python subprocesses import the wrong packages. They both import the packages, the original script was called from and not the packages the python

Build a .exe file from .py with SQLite database

隐身守侯 提交于 2019-12-24 00:37:52
问题 Program makes appointments and places them into schedule which are written in QsQLite database. The program runs from .py but I need it to be in .exe. I have used cx_Freeze to create an .exe file, but the program does not generate the SQLite database. So here is my setup file: from cx_Freeze import setup, Executable import os import sys os.environ['TCL_LIBRARY'] = r'C:\Program Files\Python35\tcl\tcl8.6' os.environ['TK_LIBRARY'] = r'C:\Program Files\Python35\tcl\tk8.6' build_exe_options = {

Making an .exe for pygame with cx-freeze

混江龙づ霸主 提交于 2019-12-24 00:31:02
问题 I've created a game in Python 3.2 and tried to turn it into a .exe with cx-freeze but when I try to run the .exe, I get an error. The Game import pygame, sys, random from pygame.locals import * pygame.init() mainClock = pygame.time.Clock() windowSurface = pygame.display.set_mode((800, 800)) pygame.display.set_caption("Dodger") def game(): WIDTH = 800 HEIGHT = 800 PLAYERSIZE = 20 PLAYERSPEED = 4 ENEMYSIZE = 10 ENEMYSPEED = 3 score = 0 BLACK = (0, 0, 0) WHITE = (255, 255, 255) GREEN = (0, 255,

cx_freeze bdist_msi: create registry entries?

…衆ロ難τιáo~ 提交于 2019-12-23 15:10:38
问题 I used bdist_msi from cx_freeze in the past and it works nice. Now I need to create registry entries Is it possible to create registry entries with bdist_msi from cx_freeze? With the wixtools these settings were done in the past: <!-- File extension .foostarter --> <RegistryValue Root='HKCR' Type='string' Key='.foostarter' Value='foostarter.File' /> <RegistryValue Root='HKCR' Type='string' Key='.foostarter' Name='Content Type' Value='application/vnd.foobar-modstarter' /> <RegistryValue Root=