I am trying to make an app for mac. When I use pyinstaller to create an exe on a Windows computer, it works fine, but when I do it on a Mac, the file matches, but then when it runs, I get the following errors.
Traceback (most recent call last): File "<string>", line 1, in <module> File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PyInstaller/loader/pyi_importers.py", line 270, in load_module exec(bytecode, module.__dict__) File "/Library/Frameworks/Python.framework/Versions/2.7/bin/build/new_client/out00-PYZ.pyz/FileDialog", line 11, in <module> File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PyInstaller/loader/pyi_importers.py", line 270, in load_module exec(bytecode, module.__dict__) File "/Library/Frameworks/Python.framework/Versions/2.7/bin/build/new_client/out00-PYZ.pyz/Tkinter", line 39, in <module> File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PyInstaller/loader/pyi_importers.py", line 409, in load_module module = imp.load_module(fullname, fp, filename, self._c_ext_tuple) ImportError: dlopen(/var/folders/vb/vb9xryxdEz467ZADn0LL7U+++TI/-Tmp-/_MEIbvFCo2/_tkinter.so, 2): Library not loaded: @loader_path/Tcl Referenced from: /var/folders/vb/vb9xryxdEz467ZADn0LL7U+++TI/-Tmp-/_MEIbvFCo2/_tkinter.so Reason: image not found
Something seems to be wrong with Tkinter and TCL. Here are the modules that are loaded by the program.
import socket, thread, time, json, traceback, FileDialog from functools import partial from mtTkinter import *
source share