cx-freeze

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

断了今生、忘了曾经 提交于 2019-11-30 12:47:57
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? 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 = [(path_base, "pytz/zoneinfo/")] for root, sub_folders, files in os.walk(path_base): for file_in_root in files:

Moving all the DLL and PYD to a sub-folder with cx_Freeze

僤鯓⒐⒋嵵緔 提交于 2019-11-30 12:24:23
This has come up quite a few times on the cx_Freeze mailing lists (see cx_Freeze and moving files around Creating fewer files when freezing a Python application cx_freeze python single file? ) and it seems to me like it ought to be a simple fix, but I can't see how to begin. I have a python application that depends on scipy, wxpython, numpy and a bunch of other packages that each have a LOT of dynamically linked libraries. The main executable folder gets very cluttered with PYD and DLL files and it is hard to even find the executable amongst all the files. My users are not particularly

How to convert python .py file into an executable file for use cross platform?

五迷三道 提交于 2019-11-30 12:07:41
问题 I've been searching through SO for a while now trying to come up with an answer to this but due to my inexperience with programming I don't understand much of the documentation, nor am I confident enough to experiment too much. Would anyone be able to describe in slightly simpler terms how I would use programs like Py2exe, PyInstaller, cx_freeze etc.? I just want a way for others (mainly friends) to be able to run my (simple, text only) program without having to download python themselves. If

exe error with cx_freeze

不问归期 提交于 2019-11-30 07:39:10
问题 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

Can't make standalone binary scrapy spider with cx_Freeze

Deadly 提交于 2019-11-30 05:42:45
问题 A short description about my working environment: win 7 x64, python 2.7 x64, scrapy 0.22, cx_Freeze 4.3.2. First, I developed a simple crawl-spider and it works fine. Then, using the core scrapy API, I created an external script main.py, which can run spider, and it also works as required. Here is the code of the script: # external main.py using scrapy core API, 'test' is just replaced name of my project from twisted.internet import reactor from scrapy.crawler import Crawler from scrapy

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

别等时光非礼了梦想. 提交于 2019-11-30 05:22:55
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", version = "0.1", description = "Sample cx_Freeze PyQt4 script", executables = [Executable("PyQt4app.py",

How to convert python .py file into an executable file for use cross platform?

血红的双手。 提交于 2019-11-30 02:01:55
I've been searching through SO for a while now trying to come up with an answer to this but due to my inexperience with programming I don't understand much of the documentation, nor am I confident enough to experiment too much. Would anyone be able to describe in slightly simpler terms how I would use programs like Py2exe, PyInstaller, cx_freeze etc.? I just want a way for others (mainly friends) to be able to run my (simple, text only) program without having to download python themselves. If there is an easier way to do this I'd appreciate knowing that too. Running Vista 32bit, python 2.7

ImportError with cx_Freeze and pyinstaller

好久不见. 提交于 2019-11-29 23:19:07
问题 I was using pyinstaller before to try and get my app with twisted as an executable, but I got this error when executing: Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/cx_Freeze/initscripts/Console.py", line 27, in <module> exec code in m.__dict__ File "client_test.py", line 2, in <module> File "/usr/local/lib/python2.7/dist-packages/Twisted-13.0.0-py2.7-linux-x86_64.egg/twisted/__init__.py", line 53, in <module> _checkRequirements() File "/usr/local/lib

How to include tkinter when using cx_freeze to convert script to .exe?

雨燕双飞 提交于 2019-11-29 22:12:07
问题 I am using cx_freeze to transfer a python file to a exe. the problem is when i exclude tkinter in the setup.py, i can generate the exe file successfully, but when execute the exe file, it says No Module named tkinter . build_exe_options = {"packages": ["os","numpy","time","optparse","linecache","pandas", "matplotlib","PIL"], "excludes": ["tkinter"]} but when I try to include tkinter , it just can't generate the exe file. build_exe_options = {"packages": ["os","numpy","time","optparse",

how to use cx_freeze in linux to create a package to be used in windows

前提是你 提交于 2019-11-29 19:33:10
问题 how to use cx_freeze in linux to create a one package to be used in windows like .exe or .bin file. I tested cx_freeze in linux but that make package for linux and in windows is unknown. for example : $ cxfreeze gui.py and this is file that maked : gui that is running only in linux. Is there any way to use cx_freeze for making exe or bin package ? Or any alternative way instead of cx_freeze to make one bin file to execute in other platform independent? I use python3(3.x). 回答1: I've been