I installed cx_Freeze via the msi installer on my Windows 7 pc. It told me the installation was successful and running pip install cx_Freeze
doesn't cause anything.
Anyway when I try to run the command cxfreeze --version
in the windows command line it tells me, that the program can not be found. I'm not even sure, if this command has to be run in the command line, or in some python shell.
Despite successful installation, there is no executable cxfreeze.xyz
file in my file system. But in the python installation folder there is a file Scripts\cxfreeze
. This file has no extension and can't be executed in the command line. It's not a binary file, but contains the following text instead:
#!C:\Python\32-bit\3.4\python.exe
from cx_Freeze import main
main()
How can I make cxfreeze run, like stated in their documentation?
According to some Windows users' reports, the problem “cx_Freeze: Python error in main script” may be caused by a poorly written Phyton application like PlayTV or Raptr. If you are in this case, you can try to uninstall PlayTV or Raptr to fix the cx_Freeze Python error.
cx_Freeze is a set of scripts and modules for freezing Python scripts into executables, in much the same way that py2exe and py2app do. Unlike these two tools, cx_Freeze is cross-platform and should work on any platform that Python itself works on. It supports Python 2.7 or higher (including Python 3).
What worked for me:
Run in cmd:
python [Python folder's dir]\Scripts\cxfreeze-postinstall
(Solution thanks to Puggie)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With