I run compiled using CX_freeze exe. On the computer where I collected everything runs fine.
On another computer, cx_freeze is trying to follow the path along which I have a python installed on my computer. cv2 is in the build and is in the lib folder, but exe searches for it along the path c: / python /
4th hour googling failed.
screen error on win7:
error screen on win10 (I don't use theano, I use tf):
from cx_Freeze import setup, Executable import os os.environ['TCL_LIBRARY'] = r'C:\Python\tcl\tcl8.6' os.environ['TK_LIBRARY'] = r'C:\Python\tcl\tk8.6' executables = [Executable('main.py', icon='ico.ico', base="Win32GUI")] build_exe_options = { "excludes": [ "astor", "html", "concurrent", "curses", "gast", "lib2to3", "pkg_resources", "pydoc_data", "werkzeug", "wsgiref", "xmlrpc", "PyQt5.QtSql", "PyQt5.QtBluetooth", "PyQt5.QtMultimedia", "PyQt5.QtNetwork", "PyQt5.QtPositioning", "PyQt5.Enginio", "PyQt5.QtWebSockets", "PyQt5.QtWebKit", "PyQt5.QtWebKitWidgets", "PyQt5.QtXml", "PyQt5.QtSvg", "PyQt5.QtSql" "PyQt5.QtTest" ], "includes": [ "cv2", 'numpy.core._methods', 'numpy.lib.format', 'threading', 'idna.idnadata', 'pyperclip', 'keras.preprocessing', 'tensorflow', 'scipy.sparse.csgraph', 'ctypes', 'os', ], "include_files": [ r"C:\Python\DLLs\tcl86t.dll", r"C:\Python\DLLs\tk86t.dll", "img", "ico.png", ], "optimize": 1} setup(name='', version='1.0', description='', executables=executables, options={"build_exe": build_exe_options}) 
