Search code examples
pythonlinuxcx-freeze

Python cx-freeze issue


Wanted to create a stand alone binary executable from a python module with cx freeze.

[root@frost-pc ~]# find / -name freeze.py

/usr/lib/python3.3/site-packages/pip/commands/freeze.py
/usr/lib/python2.7/site-packages/pip/commands/freeze.py

[root@frost-pc ~]# python2 /usr/lib/python2.7/site-packages/pip/commands/freeze.py /home/frost/Desktop/dd.py

And nothing happens, freeze.py just runs for a 3 seconds and it does not output binary file.


Solution

  • You're using wrong command: freeze.py in pip/commands directory is for pip freeze command.

    Use cxfreeze program.

    cxfreeze /home/frost/Desktop/dd.py
    

    See cxfreeze script for usage detail.