cx-freeze

cx_freeze: How do I add package files into library.zip?

戏子无情 提交于 2019-11-29 18:19:24
问题 I've noticed that pytz misses zoneinfo folder when I try to roll a zip for Windows. Right now I have a workaround that I use after python setup.py build , namely 7z a -xr!*.py* build\exe.win32-2.7\library.zip C:\Python27\Lib\site-packages\pytz Is there a proper way to achieve that from setup.py or something? 回答1: You could fix this, adding the following method: def include_files(): path_base = "C:\\Python27\\Lib\\site-packages\\pytz\\zoneinfo\\" skip_count = len(path_base) zip_includes = [

Pygame - Compiling to exe with Cx_Freeze

本秂侑毒 提交于 2019-11-29 16:34:31
I'm trying to convert my pygame game to exe with Cx_freeze; It works fine when I run it from a script, but when I run it as an exe, it crashes with a: Traceback (most recent call last): File "C:\Python32\lib\site-packages\pygame\__init__.py", line 122, in <module> try: import pygame.display File "ExtensionLoader_pygame_display.py", line 12, in <module> File "ExtensionLoader_pygame_surface.py", line 12, in <module> ImportError: No module named _view During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Python32\lib\site-packages\cx

cx_Freeze build error?

女生的网名这么多〃 提交于 2019-11-29 14:37:06
I am trying to create a binary from a python,flask and boto3 app. I am having trouble running the pip install cx_Freeze command too work. I am getting the following error : It seems to be not fetching the right system libraries. Also, can anyone suggest any tools to package python apps into binaries? Failed building wheel for cx-Freeze Running setup.py clean for cx-Freeze Failed to build cx-Freeze Installing collected packages: cx-Freeze Running setup.py install for cx-Freeze ... error Complete output from command /home/shaswat.g/.virtualenvs/flask_app/bin/python -u -c "import setuptools,

cx_freeze fails to create exe with pandas library

独自空忆成欢 提交于 2019-11-29 11:49:49
Having problems creating exe using cx_freeze with a Pandas library. I have seen lots of others having issues with numPy but I was able to successfully bring in numPy. My big pain point has been Pandas. Is there anything in Pandas that might be causing to fail? Setup file from cx_Freeze import setup, Executable build_exe_options = { "includes": ['numpy', 'pandas'], "packages": [], 'excludes' : [], "include_files": []} setup( name = "appName", version = "0.1", description = "", author = "Dengar", options = {"build_exe": build_exe_options}, executables = [Executable("appName.py")] ) Code snippet

ImportError: No module named 'queue' while running my app freezed with cx_freeze

有些话、适合烂在心里 提交于 2019-11-29 11:06:17
I am using python 3.4. I am able to run my python script without any problem. But While running my freezed python script , following error have appeared. I am able to freeze my script successfully too with cx_freeze. C:\Program Files (x86)\utils>utils.exe Traceback (most recent call last): File "C:\Python34\lib\site-packages\requests\packages\__init__.py", line 27, i n <module> from . import urllib3 File "C:\Python34\lib\site-packages\requests\packages\urllib3\__init__.py", line 8, in <module> from .connectionpool import ( File "C:\Python34\lib\site-packages\requests\packages\urllib3

cx-freeze fails to include modules even when included specifically

对着背影说爱祢 提交于 2019-11-29 11:04:11
I am trying to use cx-freeze to create a static self-contained distribution of my app (The Spye Python Engine, www.spye.dk ), however, when I run cx-freeze, it says: Missing modules: ? _md5 imported from hashlib ? _scproxy imported from urllib ? _sha imported from hashlib ? _sha256 imported from hashlib ? _sha512 imported from hashlib ? _subprocess imported from subprocess ? configparser imported from apport.fileutils ? usercustomize imported from site This is my setup.py: #!/usr/bin/env python from cx_Freeze import setup, Executable includes = ["hashlib", "urllib", "subprocess", "fileutils",

Can EXE generated by cx_freeze be completely decompiled back to readable Python code?

本秂侑毒 提交于 2019-11-29 10:36:00
I'm new to python, and I'm evaluating developing desktop programs with Python + PySide, and found that cx_freeze works very good in converting my python code into executables, and it's cross-platform. My question is, can someone else decompile an EXE generated by cx_freeze back to fully readable code , as if my original source code? Note: I'm not worried about someone cracking my program, but just don't want someone else can take my code and developed base on it. Thanks. In general - no. CX Freeze and py2exe store the PYC version of your code, the bytecode compiled from the PY files. Currently

This application failed to start because it could not find or load the Qt platform plugin “cocoa”

拜拜、爱过 提交于 2019-11-29 05:24:45
I think I did everything I could in the last 20 hours, but nothing seems to work. My app is running and working -- just as it should -- the only problem I have is that I cannot create a .app bundle from it. I tried both Py2App and cx_Freeze but non of them is working. Because of the multi-platform support I would stick with the latter -- if possible. The setup.py looks like this: import sys from cx_Freeze import setup, Executable base = None if sys.platform == 'win32': base = 'Win32GUI' OPTIONS = {'build_exe': {'includes': ['sip', 'PyQt5', 'PyQt5.QtCore', 'PyQt5.QtGui', 'PyQt5.QtWidgets',

exe error with cx_freeze

丶灬走出姿态 提交于 2019-11-29 04:44:53
Hey am relatively new to compiling python scripts to exe. Im using cx_freeze to compile my scripts and once its built i run the exe and it gives me this error. Have google around alot but not too sure. Error is: Cannot import traceback module. Exception: No module named re Original Exception: No module named re Not too sure how to go about fixing this. I read that possibly there is a clash between a module named re? in python? and a module named re in cx_freeze module? My setup file looks like: from cx_Freeze import setup, Executable includes = [] includefiles = ['remindersText.pkl']

How can I freeze a dual-mode (GUI and console) application using cx_Freeze?

柔情痞子 提交于 2019-11-29 03:51:19
问题 I've developed a Python application that runs both in the GUI mode and the console mode. If any arguments are specified, it runs in a console mode else it runs in the GUI mode. I've managed to freeze this using cx_Freeze. I had some problems hiding the black console window that would pop up with wxPython and so I modified my setup.py script like this: import sys from cx_Freeze import setup, Executable base = None if sys.platform == "win32": base = "Win32GUI" setup( name = "simple_PyQt4",