1

I don't know what the deal is, but I installed cx_Freeze with pip

pip install cx_Freeze 

Pip says that everything is installed into my site-packages folder.

I double checked that cx_Freeze is in the folder and that the folder in on my windows PATH.

But whenever I try to run cxfreeze I get an 'cxfreeze' is not recognized as an internal or external command, operable program or batch file error.

I tried running:

cxfreeze bookit.py --target-dir bookitdir

cx_Freeze bookit.py --target-dir bookitdir

all to no avail. I am not super familiar with windows. I do all my hacking on my macbook, so I'm sorry if this is a dumb question.

Edit: I also confirmed that C:\Python27\Scripts\ is on the path as well. Still no dice.

Chase Roberts
  • 9,082
  • 13
  • 73
  • 131
  • 1
    Known issue: https://bitbucket.org/anthony_tuininga/cx_freeze/issue/90/cxfreeze-in-windows-is-not-executable I'll try to fix it today. – Thomas K Oct 24 '14 at 17:37
  • 1
    possible duplicate of [installing cx\_Freeze to python at windows](http://stackoverflow.com/questions/25270885/installing-cx-freeze-to-python-at-windows) – zom-pro Sep 21 '15 at 12:57

3 Answers3

1

I know it's an old question but In Windows 11, Assuming you've already had the environmental variables set up.

Using Python 3.10 After installing cx_Freeze with pip like this

pip install cx_Freeze

You have to call it like this

cxfreeze <your-python-file>

instead of the usual linux cx_Freeze

This is how windows copy the file, you have to reference it like below, or you could also change the name of the file to the one you normally use in Linux

enter image description here

Now you can enjoy playing Sticky Bubble on Android and relax a bit while it installs and compiles your app :)

Fahad
  • 1,943
  • 22
  • 27
0

If python was installed in "C:\Python34\", usually cxfreeze would be installed in "C:\Python34\Scripts". Make sure it was in PATH too. And cxfreeze.bat should be edited to point to the right exe files.

dif
  • 35
  • 9
  • could you elaborate on the part about editing the .bat? I have never had to do that for other machines. Usually, it's just 'pip install' and then it works.. – Chase Roberts Oct 24 '14 at 15:18
0

As the selected answer here just do the following orders:

  1. cd to your python directory and then the Scripts folder, for me it is:

    C:\Python27\Scripts
    
  2. Here just run the following command:

    python cxfreeze-postinstall
    
  3. Now you can use cxfreeze like this:

    cxfreeze hello.py --target-dir=your_target_directory
    

Hint: For 3 DO NOT forget to run cmd as Administrator

Ali Kareshki
  • 71
  • 1
  • 6