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:
sudo apt-get install python3-dev
sudo apt-get install libssl-dev
Open setup.py and change the line
if not vars.get("Py_ENABLE_SHARED", 0):
to
if True:
python3 setup.py build
sudo python3 setup.py install
For python 2.7:
sudo apt-get install python-dev
sudo apt-get install libssl-dev
Open setup.py and change the line
if not vars.get("Py_ENABLE_SHARED", 0):
to
if True:
python setup.py build
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