Skip to content Skip to sidebar Skip to footer

Cx_freeze: "no Module Named 'codecs'"

I've been desperately trying to compile my python pygame program into standalone executables to no prevail. PyInstaller doesn't work properly with pygame, Nuitka doesn't make stand

Solution 1:

I had exactly the same issue with cx_Freeze 5.0.1, python 3.4.4 on Ubuntu 15.10. As suggested by @Anthony Tuininga, reinstalling python from the source fixed the problem, for instance from this source :

wget https://www.python.org/ftp/python/3.4.4/Python-3.4.4.tgz
tar xzf Python-3.4.4.tgz

# I had to specify the location of zlib in my casecd Python-3.4.4
./configure --with-zlib-dir=/usr/lib/x86_64-linux-gnu
sudo make altinstall

Then, I installed cx_Freeze from source :

wget https://github.com/anthony-tuininga/cx_Freeze/archive/5.0.1.tar.gz
tar xzf 5.0.1.tar.gz
cd ./cx_Freeze-5.0.1/
python3.4 setup.py build
sudo python3.4 setup.py install

I also installed pygame from source (as you are using it too) :

wget https://github.com/pygame/pygame/archive/1.9.3.tar.gz
tar xzf 1.9.3.tar.gz
cd ./pygame-1.9.3/
python3.4 setup.py build
sudo python3.4 setup.py install

Post a Comment for "Cx_freeze: "no Module Named 'codecs'""