4

I have a software written in python with a graphical user interface written in PyQt.

To create an executable of the software, I ship with it a Python and a Qt precompiled version and the trick seems to work in Windows and Linux since I know how to create an installer.

The problem is to embed evrything into a Mac .app.

To launch the software I use the following shell script

export DYLD_LIBRARY_PATH=`pwd`/lib:$DYLD_LIBRARY_PATH
export DYLD_FRAMEWORK_PATH=`pwd`/Resources
PYTHONPATH=$PYTHONPATH:. bin/python ProgramPy/Main.py

If I run this shell script from outside it works fine, but when I try to embed everything into an app with platypus I get the following error.

dyld: Library not loaded: @executable_path/../.Python
  Referenced from: /Users/luca/Desktop/TempScript.app/Contents/Resources/bin/python
  Reason: image not found
./run.sh: line 3:   725 Trace/BPT trap          PYTHONPATH=$PYTHONPATH:. bin/python ProgramPy/Main.py

Note that the file /Users/luca/Desktop/TempScript.app/Contents/Resources/bin/python is the executable version of python and it is actually located into the Resources folder of the app. I don't understand why the system cannot find it. Maybe I missed something in understanding how mac uses the pythonpath?

1 Answer 1

3

I just use py2app.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.