I distributed a Python app for OSX machines thanks to py2app. Anytime I build the application, I use virtualenv. It manages all my dependencies too.
Running the application on my laptop works fine. I tried on a couple of other machines too, everything is fine. However, on a single machine, I get this error when launching my app:
8/19/15 5:41:08.787 PM main: main Error
8/19/15 5:41:10.997 PM [0x0-0xb10b1].org.pythonmac.unspecified.main: Traceback (most recent call last):
8/19/15 5:41:10.997 PM [0x0-0xb10b1].org.pythonmac.unspecified.main: File "/Users/foo/Desktop/synchronizer.app/Contents/Resources/__boot__.py", line 351, in <module>
8/19/15 5:41:10.997 PM [0x0-0xb10b1].org.pythonmac.unspecified.main: _run()
8/19/15 5:41:10.997 PM [0x0-0xb10b1].org.pythonmac.unspecified.main: File "/Users/foo/Desktop/synchronizer.app/Contents/Resources/__boot__.py", line 336, in _run
8/19/15 5:41:10.997 PM [0x0-0xb10b1].org.pythonmac.unspecified.main: exec(compile(source, path, 'exec'), globals(), globals())
8/19/15 5:41:10.997 PM [0x0-0xb10b1].org.pythonmac.unspecified.main: File "/Users/foo/Desktop/synchronizer.app/Contents/Resources/main.py", line 1, in <module>
8/19/15 5:41:10.997 PM [0x0-0xb10b1].org.pythonmac.unspecified.main: from window import Window
8/19/15 5:41:10.997 PM [0x0-0xb10b1].org.pythonmac.unspecified.main: File "window.pyc", line 2, in <module>
8/19/15 5:41:10.998 PM [0x0-0xb10b1].org.pythonmac.unspecified.main: File "requests/utils.pyc", line 17, in <module>
8/19/15 5:41:10.998 PM [0x0-0xb10b1].org.pythonmac.unspecified.main: File "platform.pyc", line 115, in <module>
8/19/15 5:41:10.998 PM [0x0-0xb10b1].org.pythonmac.unspecified.main: File "subprocess.pyc", line 405, in <module>
8/19/15 5:41:10.998 PM [0x0-0xb10b1].org.pythonmac.unspecified.main: ImportError: dlopen(/Users/foo/Desktop/synchronizer.app/Contents/Resources/lib/python3.4/lib-dynload/_posixsubprocess.so, 2): Symbol not found: _dirfd
8/19/15 5:41:10.998 PM [0x0-0xb10b1].org.pythonmac.unspecified.main: Referenced from: /Users/foo/Desktop/synchronizer.app/Contents/Resources/lib/python3.4/lib-dynload/_posixsubprocess.so
8/19/15 5:41:10.998 PM [0x0-0xb10b1].org.pythonmac.unspecified.main: Expected in: /usr/lib/libSystem.B.dylib
8/19/15 5:41:10.998 PM [0x0-0xb10b1].org.pythonmac.unspecified.main: in /Users/foo/Desktop/synchronizer.app/Contents/Resources/lib/python3.4/lib-dynload/_posixsubprocess.so
8/19/15 5:41:11.027 PM com.apple.launchd.peruser.502: ([0x0-0xb10b1].org.pythonmac.unspecified.main[889]) Exited with code: 255
This machine runs the 10.7.5 version of OSX. I do not know if it is a matter of distribution or something relative to this machine/environment.
I tried to distribute the application by running virtualenv with the --no-site-packages
flag but it had no impact.
Any idea?