I've recently created a GUI application using tkinter in python. When i create the application in 'Alias mode' using:
python3 setup.py py2app -A
The application is created and everything works as intended with no issues. I did this to ensure that it would then work when creating the stand-alone version, however it doesn't. The application fails to open and, although i'm given the option to enter the Console, i have no idea how to interpret the data that is presented. Because of this i opened the app through 'package contents' and these were the errors that i received in terminal:
ImportError: dlopen(/Users/MYNAME/dist/MYAPP.app/Contents/Resources/lib/python3.8/lib-dynload/sklearn/__check_build/_check_build.so, 2): Library not loaded: @loader_path/../.dylibs/libomp.dylib
Referenced from: /Users/MYNAME/lib/python3.8/lib-dynload/sklearn/__check_build/_check_build.so
Reason: image not found
and:
NotADirectoryError: [Errno 20] Not a directory: '/Users/MYNAME/dist/MYAPP.app/Contents/Resources/lib/python38.zip/sklearn/__check_build'
Also, although i'm not sure it's relevant, in my setup.py file i didn't specify the selenium chromedriver that i'm using in the 'DATA_FILES' section. Should i have done this?
Here's a copy of my setup file for reference:
from setuptools import setup
APP = ['test9.py']
APP_NAME = "MYAPP"
DATA_FILES = ['logocopy.png', 'britishdict.txt']
OPTIONS = {
'iconfile':'app_icon.icns',
'argv_emulation': True,
'packages': ["certifi"],
'plist': {
'CFBundleName': APP_NAME,
'CFBundleDisplayName': APP_NAME,
'CFBundleGetInfoString': "MYAPP GUI",
'CFBundleVersion': "1.0.7",
'CFBundleShortVersionString': "1.0.7",
'NSHumanReadableCopyright': u"Copyright © 2020, MYNAME, All Rights Reserved"
}
}
setup(
name=APP_NAME,
app=APP,
data_files=DATA_FILES,
options={'py2app': OPTIONS},
setup_requires=['py2app'],
)
Could someone offer some insight into what the issue may be? Thanks in advance.