I am trying to create a standalone Mac GUI app.
I used wxPython (wxpython-phoenix 4.0.0a4) to create the GUI.
I am trying to use py2app (0.14) to create a standalone app that can be used on a different machine not requiring a python installation.
Initially, I tried using anaconda python, but ran into grave difficulties. Now, I’m using homebrew python2.7.
The app runs fine on my local machine fine.
But on the target machine, I get the following error. “import cv2” is looking for libjpeg in a hardcoded location instead of inside the standalone Contents.
(There is a version of libjpeg inside: /repos/ct/dist/CtAnnotator.app/Contents/Frameworks/libjpeg.8.dylib.)
Traceback (most recent call last):
File “/Volumes/PciSsd/repos/ct/dist/CtAnnotator.app/Contents/Resources/boot.py”, line 98, in
_run()
File “/Volumes/PciSsd/repos/ct/dist/CtAnnotator.app/Contents/Resources/boot.py”, line 82, in _run
exec(compile(source, path, 'exec'), globals(), globals())
File “/Volumes/PciSsd/repos/ct/dist/CtAnnotator.app/Contents/Resources/CtAnnotator.py”, line 7, in
import cv2
ImportError: dlopen(/Volumes/PciSsd/repos/ct/dist/CtAnnotator.app/Contents/Resources/lib/python2.7/lib-dynload/cv2.so, 2): Library not loaded: /usr/local/opt/jpeg/lib/libjpeg.8.dylib
Referenced from: /Volumes/PciSsd/repos/ct/dist/CtAnnotator.app/Contents/Frameworks/libopencv_highgui.2.4.13.dylib
Reason: image not found
Does anyone have ideas on how to proceed?