cx-freeze

AttributeError: module 'dis' has no attribute '_unpack_opargs' While Building Python 3.6 executable using CX_FREEZE

限于喜欢 提交于 2019-12-06 11:54:39
问题 I have been trying to Convert my Python 3.6 Programs into.EXE. When I build using cx_Freeze. It generates the following error. (See Log Below) I was earlier working with Kivy Module but after the build failed repeatedly I tried it with simple Hello World Program still, It failed. My setup file contains from cx_Freeze import setup, Executable import statement, When I build through python setup.py build It generates this log. F:\Python\test>python setup.py build running build running build_exe

Python cx_freeze 4.3.4: Setting targetName causes errors

好久不见. 提交于 2019-12-06 11:45:08
I am very new to cx_freeze and I am trying to understand it a bit better, I have this setup.py file: import sys from cx_Freeze import setup, Executable # Dependencies are automatically detected, but it might need fine tuning. build_exe_options = {"packages": ["os"], "excludes": ["tkinter"]} setup( name = "guifoo", version = "0.1", description = "My GUI application!", options = {"build_exe": build_exe_options}, executables = [Executable("mypy.py", base="Console", targetName="hello")]) which if I remove the targetName="hello" it works however when I include it, it doesnt. Would anyone know why?

Packing a Scrapy application using Cx_freeze or Py2Exe

为君一笑 提交于 2019-12-06 05:51:51
I'm trying to package a web scraping script (built using scrapy) to run as a standalone application for my boss to use. I built a small desktop GUI using Tkinter that calls my Scrapy spiders through an os.system call. My current build implementation (using cx_Freeze) is below. It successfully packages my program into an .exe that works properly on my machine. However, when I try to port it to another Windows machine and run it, the GUI works but the system calls do not. I figure this is because my current approach requires scrapy to be installed on that machine bc it uses a system call, but I

CX_Freeze executable gives “unable to load file system codec” error

别来无恙 提交于 2019-12-06 05:19:12
问题 I'm trying to get a hello world program to work with cx_freeze. It's building fine but I get errors when I run the exe: Fatal Python error: Py_Initialize: unable to load the file system codec ImportError: No module named 'encodings' My python script: if __name__ == '__main__': print('Hello World.') And my cx_freeze setup file: import sys from cx_Freeze import setup, Executable exe = Executable( script="py_helloWorld.py" ) setup( name = "helloWorld", version = "0.1", description = "Hello World

cx_freeze ImportError when executing file

我的梦境 提交于 2019-12-06 05:17:00
The program is designed to capture the title bar of the users foreground window and append that title along with the datetime to a log file. When I run this code on my computer it works, however when I run the executable on another computer I get the error you can see below: Python file: from win32gui import GetForegroundWindow, GetWindowText from datetime import datetime from time import sleep from os.path import join log_path = r'C:\Office Viewer\OV_Log.txt' while True: window_name = GetWindowText(GetForegroundWindow()) current_time = datetime.strftime(datetime.now(), '%Y/%m/%d_%H:%M:%S, ')

cx_Freeze Exe Application closes as soon as opens

懵懂的女人 提交于 2019-12-06 04:16:38
问题 I am trying to just convert my pygame python project to a .exe file using cx_Freeze. The setup file executes correctly and without error, but the issue is that when I run my .exe file the console window will open and close and my game window will not appear. The setup.py I am using: import os os.environ['TCL_LIBRARY'] = "C:\\Users\\MY_USERNAME\\AppData\\Local\\Programs\\Python\\Python35-32\\tcl\\tcl8.6" os.environ['TK_LIBRARY'] = "C:\\Users\\MY_USERNAME\\AppData\\Local\\Programs\\Python\

subprocess.Popen behavior after cx_freeze

∥☆過路亽.° 提交于 2019-12-06 04:10:22
I have some python code using subprocess.Popen to open a console application and get stdout/stderr from it. Launching from the interpreter works fine and as intended. After using cx_freeze with --base-name Win32GUI option the Popen pops up in a console window now and I can't capture stdout/stderr. If I remove --base-name Win32GUI it works as intended but I now have a console behind the UI. Here is the code (I've tried it without startupinfo and without shell=False ): startupinfo = subprocess.STARTUPINFO() startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW startupinfo.wShowWindow =

SyntaxError when using cx_freeze on PyQt app

浪尽此生 提交于 2019-12-06 04:07:04
问题 This is quite annoying problem that occurs when trying to build .exe file from Python 3 script using PyQt4. I think it is connected with using uic module for dynamic loading of .ui files. cx_freeze returns: File "E:\Python32_32\lib\site-packages\cx_Freeze\finder.py", line 366, in _LoadModule module.code = compile(codeString, path, "exec") File "E:\Python32_32\lib\site-packages\PyQt4\uic\port_v2\load_plugin.py", line 41 except Exception, e: ^ SyntaxError: invalid syntax I have solved this

error 3 on dateutil/zoneinfo using cx_freeze and pandas

我的未来我决定 提交于 2019-12-06 01:42:43
问题 When I try to compile the hello.py file with cx_freeze, I get the following error with pandas 0.15.2 but no error with 0.15.1. Has someone any idea on how to correct it ? I have include the dateutil/zoneinfo files with the include_files function but the problem still occurs. hello.py: import numpy as np import pandas as pd import matplotlib import matplotlib.pyplot as plt print 'hello world' df_dates = pd.date_range(start='01/01/2013', freq='H', periods=100) df = pd.DataFrame(range(len(df

python requests and cx_freeze

不想你离开。 提交于 2019-12-06 00:58:48
问题 I am trying to freeze a python app that depends on requests, but I am getting the following error: Traceback (most recent call last): File "c:\Python33\lib\site-packages\requests\packages\urllib3\util.py", line 630, in ssl_wrap_socket context.load_verify_locations(ca_certs) FileNotFoundError: [Errno 2] No such file or directory Looks like it is having trouble finding the ssl certificate with the executable. I found this which seems to be the same problem, but I am not able to figure out how