2

I have created a virtual env on MacOS 10.14, with python 2.7, pip installed py2app, wxpython, etc, ran the Py2app command:

sudo python setup.py py2app

Upon running the app, I see the below error:

(ENV) kevins-MacBook-Pro:Audio_Export_App kevin$ /Users/kevin/python_scripts/Audio_Export_App/dist/Audio_Export_App_V3.3.app/Contents/MacOS/Audio_Export_App_V3.3 
Traceback (most recent call last):
  File "/Users/kevin/python_scripts/Audio_Export_App/dist/Audio_Export_App_V3.3.app/Contents/Resources/__boot__.py", line 107, in <module>
    _run()
  File "/Users/kevin/python_scripts/Audio_Export_App/dist/Audio_Export_App_V3.3.app/Contents/Resources/__boot__.py", line 82, in _run
    exec(compile(source, path, 'exec'), globals(), globals())
  File "/Users/kevin/python_scripts/Audio_Export_App/dist/Audio_Export_App_V3.3.app/Contents/Resources/Audio_Export_App_V3.3.py", line 1, in <module>
    import wx
  File "wx/__init__.pyc", line 17, in <module>
  File "wx/core.pyc", line 12, in <module>
  File "wx/_core.pyc", line 14, in <module>
  File "wx/_core.pyc", line 10, in __load
ImportError: dlopen(/Users/kevin/python_scripts/Audio_Export_App/dist/Audio_Export_App_V3.3.app/Contents/Resources/lib/python2.7/lib-dynload/wx/_core.so, 2): Symbol not found: __ZThn1216_N10wxTextCtrl3CutEv
  Referenced from: /Users/kevin/python_scripts/Audio_Export_App/dist/Audio_Export_App_V3.3.app/Contents/Resources/lib/python2.7/lib-dynload/wx/_core.so
  Expected in: /usr/local/lib/libwx_osx_cocoau_core-3.0.0.4.0.dylib
 in /Users/kevin/python_scripts/Audio_Export_App/dist/Audio_Export_App_V3.3.app/Contents/Resources/lib/python2.7/lib-dynload/wx/_core.so
2018-10-17 07:58:27.927 Audio_Export_App_V3.3[10303:567300] Audio_Export_App_V3.3 Error
2018-10-17 07:58:28.070 Audio_Export_App_V3.3[10303:567300] GetInputSourceEnabledPrefs user file path = /Users/kevin/Library/Preferences/com.apple.HIToolbox.plist
2018-10-17 07:58:28.070 Audio_Export_App_V3.3[10303:567300] GetInputSourceEnabledPrefs effective user id path = 501
2018-10-17 07:58:28.070 Audio_Export_App_V3.3[10303:567300] GetInputSourceEnabledPrefs user pref content = <CFBasicHash 0x10017c320 [0x7fff9887c8e0]>{type = immutable dict, count = 0,
entries =>
}

I have searched high and low for a solution, but cannot find one. Anyone able to shed some light on this issue please?

speedyrazor
  • 3,127
  • 7
  • 33
  • 51

1 Answers1

3

This is an issue with Py2App. It can be solved by manually specifying the wx package during the build process:

python setup.py py2app --packages=wx

Hope that helps.

Source: https://bitbucket.org/ronaldoussoren/py2app/issues/252/py2app-creates-broken-bundles-with

Technoloft
  • 622
  • 4
  • 18