Getting “ImportError: DLL load failed: The specified module could not be found” when using cx_Freeze even with tcl86t.dll and tk86t.dll added in

In cx_Freeze version 5.1.1, the included modules are in a subdirectory lib of the build directory. The tcl86t.dll and tk86t.dll DLLs apparently need to be moved there as well. You can do this with the following modification of your setup.py script: build_exe_options = {“packages”: [“winsound”, “random”, “time”, “tkinter”, “math”], “include_files”: [(‘tcl86t.dll’, os.path.join(‘lib’, ‘tcl86t.dll’)), (‘tk86t.dll’, os.path.join(‘lib’, … Read more

Python: is the current directory automatically included in path?

Python adds the directory where the initial script resides as first item to sys.path: As initialized upon program startup, the first item of this list, path[0], is the directory containing the script that was used to invoke the Python interpreter. If the script directory is not available (e.g. if the interpreter is invoked interactively or … Read more

What does “Symbol not found / Expected in: flat namespace” actually mean?

Description The problem was caused by mixing objects that compiled with libc++ and object that compiled with libstdc++. In our case, the library myMod.so (compiled with libstdc++) need boost-python that compiled with libstdc++ (boost-python-libstdc++ from now). When boost-python is boost-python-libstdc++, it will work fine. Otherwise – on computer that its boost-python has compiled with libc++ … Read more

Why can’t Python import Image from PIL?

I had the same error. Here was my workflow. I first installed PIL (not Pillow) using pip install –no-index -f https://dist.plone.org/thirdparty/ -U PIL Then I found Pillow and installed it using pip install Pillow What fixed my issues was uninstalling both and reinstalling Pillow pip uninstall PIL pip uninstall Pillow pip install Pillow