Compiling Cx-Freeze under Ubuntu Compiling Cx-Freeze under Ubuntu linux linux

Compiling Cx-Freeze under Ubuntu


In setup.py string

if not vars.get("Py_ENABLE_SHARED", 0):

replace by

if True:

Thanks to Thomas K


From cx_freeze/issues

Download

You need to download the source code

For python 3.3 and 3.4:

  1. sudo apt-get install python3-dev

  2. sudo apt-get install libssl-dev

  3. Open setup.py and change the line

    if not vars.get("Py_ENABLE_SHARED", 0):

    to

    if True:

  4. python3 setup.py build

  5. sudo python3 setup.py install

For python 2.7:

  1. sudo apt-get install python-dev

  2. sudo apt-get install libssl-dev

  3. Open setup.py and change the line

    if not vars.get("Py_ENABLE_SHARED", 0):

    to

    if True:

  4. python setup.py build

  5. sudo python setup.py install


GriMel's answer worked for me. Until cx_freeze releases an update for this, I'm including a set of steps that you can do to get this working using GriMels' solution.

# create and activate virtualenv (as desired)virtualenv envs/test_cxfreeze. ./envs/test_cxfreeze/bin/activate# download cxfreeze; do not install yet mkdir src/ pip install --download=./src/ cx-freezetar zxvf ./src/cx_Freeze-4.3.4.tar.gz -C ./src/# fix bug in setup.pyvim src/cx_Freeze-4.3.4/setup.py84c84<             if True:--->             if not vars.get("Py_ENABLE_SHARED", 0):# install cxfreezepip install ./src/cx_Freeze-4.3.4/

I've also opened up a bitbucket issue with what appears to be the source repo.

https://bitbucket.org/anthony_tuininga/cx_freeze/issues/153/cx_freeze-434-compile-error-on-ubuntu-1404