Programming

(Python) cx_freeze: make executable

steloflute 2013. 1. 31. 22:11

http://gauryan.ivyro.net/wiki/doku.php?id=comlang:python:cx_freeze


  • Install cx_Freeze (Debian/Ubuntu)
    $ wget http://downloads.sourceforge.net/project/cx-freeze/4.2.3/cx_Freeze-4.2.3.tar.gz
    $ tar xvfz cx_Freeze-4.2.3.tar.gz
    $ cd cx_Freeze-4.2.3
    $ python setup.py build; python setup.py install

    참고 : 아래와 같이 pip 으로 설치하면 에러를 뿜어내고 설치 실패한다.

    $ pip install cx-Freeze
  • Create hello.py
    # hello.py
    print('Hello, World~!\n')
  • Create exe file
    $ cxfreeze hello.py --target-dir dist