Questions tagged [cx-freeze]

cx_Freeze is a set of scripts and modules for freezing Python scripts (.py) into executable files for Windows (.exe), Mac OS (.app), or Linux.

cx_Freeze is a set of scripts and modules for freezing Python scripts (.py) into executable files for Windows (.exe), Mac OS (.app), or Linux, in much the same way that py2exe and py2app do. These executable files can run on a system without Python installed.

cx_Freeze works with Python versions 2.7 to 3.8.

For Python version 2.7, the latest stable version of cx_Freeze is 5.1.1 (released December 2017) which can be downloaded here: https://pypi.org/project/cx-Freeze/5.1.1/

For Python versions 3.0 to 3.4, the latest stable version of cx_Freeze is 5.0.2 (released May 2017) which can be downloaded here: https://pypi.org/project/cx-Freeze/5.0.2/

For Python versions 3.5 to 3.8, the latest stable version of cx_Freeze is 6.1 (released January 2020) which can be downloaded here: https://pypi.org/project/cx-Freeze/6.1/

Documentation: http://cx-freeze.readthedocs.io/en/latest/index.html

Project: https://anthony-tuininga.github.io/cx_Freeze/

1734 questions
67
votes
2 answers

NameError: name 'exit' is not defined

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…
Tim
  • 2,701
  • 3
  • 26
  • 47
61
votes
4 answers

How can I bundle other files when using cx_freeze?

I'm using Python 2.6 and cx_Freeze 4.1.2 on a Windows system. I've created the setup.py to build my executable and everything works fine. When cx_Freeze runs, it moves everything to the build directory. I have some other files that I would like…
Mridang Agarwalla
  • 43,201
  • 71
  • 221
  • 382
47
votes
7 answers

KeyError: 'TCL_Library' when I use cx_Freeze

When I use cx_Freeze I get a keyerror KeyError: 'TCL_Library'while building my pygame program. Why do I get this and how do I fix it? My setup.py is below: from cx_Freeze import setup, Executable setup( name = "Snakes and Ladders", version…
Orange1861
  • 595
  • 1
  • 4
  • 10
40
votes
6 answers

How do I use cx_freeze?

I've created my setup.py file as instructed but I don't actually.. understand what to do next. Typing "python setup.py build" into the command line just gets a syntax error. So, what do I do? setup.py: from cx_Freeze import setup,…
Edwin
  • 552
  • 1
  • 5
  • 12
39
votes
2 answers

Which is better - PyInstaller or cx_Freeze?

Could someone tell me which is better of the two for bundling Python applications — cx_Freeze or PyInstaller? I'm looking for a comparison based on factors such as: Popularity (i.e. larger user base) Footprint of the built binary Cross platform…
Mridang Agarwalla
  • 43,201
  • 71
  • 221
  • 382
37
votes
4 answers

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

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…
Peter Varo
  • 11,726
  • 7
  • 55
  • 77
33
votes
6 answers

python: Can I run a python script without actually installing python?

I have some .py files I wrote that I want to run on a different machine. The target machine does not have python installed, and I can't 'install' it by policy. What I can do is copy files over, run my stuff, and then remove them. What I tried was…
ccwhite1
  • 3,625
  • 8
  • 36
  • 47
33
votes
1 answer

multiprocessing.freeze_support()

Why does the multiprocessing module need to call a specific function to work when being "frozen" to produce a windows executable?
Voo
  • 29,040
  • 11
  • 82
  • 156
32
votes
3 answers

cx-freeze, runpy and multiprocessing - multiple paths to failure

This is a bit of a complex one, and may take some of your time. The basic problem is, that on linux (Ubuntu in my test case) a cx-freeze'd version of my program (Omnitool) is not able to create subprocesses. It works on Windows 7, however. Or when…
Berserker
  • 1,112
  • 10
  • 26
31
votes
4 answers

How can I hide the console window when freezing wxPython applications with cxFreeze?

I'm developing a Python application using wxPython and freezing it using cxFreeze. All seems to be going fine apart from this following bit: When I run the executable created by cxFreeze, a blank console window pops up. I don't want to show it. Is…
Mridang Agarwalla
  • 43,201
  • 71
  • 221
  • 382
30
votes
4 answers

cx_Freeze python single file?

I've been using cx_Freeze for a while now and there is one thing I've really wanted to do: put ALL files into ONE executable that I can distribute. It's not really user-friendly to send around a folder filled with 30 files, all in the same…
pajm
  • 1,788
  • 6
  • 24
  • 30
26
votes
3 answers

installing cx_Freeze to python at windows

I am using python 3.4 at win-8. I want to obtain .exe program from python code. I learned that it can be done by cx_Freeze. In MS-DOS command line, I wrote pip install cx_Freeze to set up cx_Freeze. It is installed but it is not working. (When I…
mesel
  • 435
  • 2
  • 5
  • 11
23
votes
4 answers

importError: no module named _winreg python3

Where can I download _winreg for python3 if I can at all. I have my 'windir' on E:\Windows. I do not know if cx_Freeze did not notice that. I am using cx_Freeze to create an msi installer.
BantuCoder
  • 251
  • 1
  • 2
  • 8
23
votes
4 answers

cx_Freeze - Preventing including unneeded packages

I have coded a tiny python program using PyQt4. Now, I want to use cx_Freeze to create a standalone application. Everything works fine - cx_Freeze includes automatically all necessary modules; the resulting exe works. The only problem is that…
Samufi
  • 2,465
  • 3
  • 19
  • 43
23
votes
1 answer

How can I include a folder with cx_freeze?

I am using cx_freeze to deploy my application. I would like to include a entire directory since including individual files doesn't put them in a folder. How can I include a folder?
Casebash
  • 114,675
  • 90
  • 247
  • 350
1
2 3
99 100