This topic was published by DevynCJohnson and viewed 1461 times since "". The last page revision was "".
- Topics - 444
pip install cx_Freezeon a Debian-based system in a command-line installs cxfreeze for Python. However, many Debian users have errors when building the source code. Thankfully, cxfreeze can still be obtained and built successfully. People may download the patch tarball above, or they can use the directions given below. I have tested these directions successfully using cxfreeze 4.3.4.
1. Download the source code from one of these two websites –
2. View the code for the "setup.py"
3. Go to line 80
4. Depending on the version of cxfreeze obtained, the line
if not vars.get("Py_ENABLE_SHARED", 0):will be line number 80 or 81 (possibly even somewhere between 76-85).
HINT: The line before it is
vars = distutils.sysconfig.get_config_vars().
5. Once found, replace
if not vars.get("Py_ENABLE_SHARED", 0):with
if True:. Do not change the indent from the original layout.
6. Save and close the file.
7. Continue to install cxfreeze using the setup.py file as normal.
8. To use cxfreeze3 (cxfreeze specifically for Python3 on systems with Python2 and Python3) from a command-line, create a file named "cxfreeze3″ and put in the code below (it is just three lines of code). Remember to save and close the file.
#!/usr/bin/env python3 from cx_Freeze import main main()
9. Make the new script executable (
IN-THE-SHELL:$ chmod +x cxfreeze3).
10. Place the script in /usr/bin/ or some other preferred path location using Root privileges (
SHELL:$ cp ./cxfreeze3 /usr/bin/cxfreeze3).