Monday, January 26, 2015

cx_freeze issues with scipy

When using Cx_freeze with a script that uses an interpolation function from scipy I was getting import errors. More specifically the error was "ImportError: No module named _ufuncs_cxx"

This can be solved by explicitly adding two scipy modules:
cxfreeze --include-modules=scipy.special._ufuncs_cxx,scipy.sparse.csgraph._validation your_script.py --target-dir your_target_dir

This solution is based on information from this website.