Skip to content Skip to sidebar Skip to footer

Cx_freeze Error: Baseline Image Directory Does Not Exist

I'm trying to create an executable file out of a python scripts on Windows in Anaconda virtual environment with cx_Freeze library. I was trying to do it with version 6.1 but I was

Solution 1:

My original answer: https://github.com/marcelotduarte/cx_Freeze/issues/692#issuecomment-657125847

I have already identified the source of this problem, it is the patch 7ec3eaa.

Using the matplot sample, I see an issue with numpy 1.18.3 to 1.19 and pillow 7.x, and I'm investigating.

For now, it has a workaround.

pip install "numpy<1.18.3" "pillow<7"

To build add ["matplotlib.tests", "numpy.random._examples"] to excludes or build with:

python setup.py build_exe --excludes=matplotlib.tests,numpy.random._examples

If you have a "excludes" in your setup.py, add the two excluded modules int it, options in setup is exclusive.

Solution 2:

Downgrading cx_freeze from version 6.2 to 6.1 made this error message go away. Now I have another error when running the executable: No module named mpl_toolkits.

I will edit my answer when I know more. I just wanted to answer right away, so you know someone else is having the same problem. :)

Solution 3:

Downloading to cx_freeze 6.1 worked for me thank you! for no module named mpl_toolkits error you need to tell cx_freeze where to find mpl_toolkits. This can be done using site.getsitepackages()[1] + '/mpl_toolkits', you may have to use site.getusersitepackages() if not on path. For example:

build_exe_options = {"include_files": [(site.getsitepackages()[1] + '/mpl_toolkits', "mpl_toolkits")]}

Post a Comment for "Cx_freeze Error: Baseline Image Directory Does Not Exist"