Hi, Thanks for all that info! I think I might now have a few ideas as to the problems and what is happening. I think the problem is in the Info.plist file that py2app creates for the Mac application. I'll answer more below:
>>> from Carbon.Evt import TickCount > > The custom python interpreter in the 1.3.14 bundle will not run: > > $ cd /Applications/relax.app/Contents/MacOS > $ ls > python relax > $ ./python > python: posix_spawn: /Applications/relax.app/Contents/MacOS/python2.6: No > such file or directory This is fascinating, why is it looking for that? I have recursively grepped the DMG file contents to find a reference to python2.6, and only the ./Frameworks/Python.framework/Versions/2.6/Python binary file has that, but only for lib/python2.6! Bizarre! > There is something missing, or some paths get mixed up. However, this gives > different errors with the 1.3.13 version (my .app is renamed): > $ cd "/Applications/relax 3.13.app/Contents/MacOS" > $ ls > python relax > $ ./python > Could not find platform independent libraries <prefix> > Could not find platform dependent libraries <exec_prefix> > Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] > ImportError: No module named site Again, very strange! >>> 3.14 fails in both ways, though. >> >> This is strange as the wx code in relax is identical in 1.3.13 vs. >> 1.3.14. The Xcode versions are different though, thanks to the Mac >> update. This again indicates that we need some type of workaround for >> problems in the Mac Frameworks. > > Is it possible that PATHs got mangled with the newer versions? The custom > python version inside the bundle will not start, because it looks for data > where nothing is: > > $ ./python > python: posix_spawn: /Applications/relax.app/Contents/MacOS/python2.6: No > such file or directory I think the problem here might be the Info.plist file! > See below for an extensive list of what I tried and what the corresponding > output was. Let me know if I can do anything else for you. > > Cheers > Martin > > #### > # 1.) Running the relax py2app bundle, equivalent double-clicking the bundle > > $ cd /Applications/ > $ open relax.app > $ # (a window opens with the said the "TickCount" error message) This indicates that somehow the wrong Python site packages are being called up! > #### > # 2.) Running the relax py2app custom binary > > $ cd /Applications/relax.app/Contents/MacOS > $ ls > python relax > $ ./relax > Please install the wx Python module to access the relax GUI. > # (this worked with the 1.3.13 version of relax) This is clearly not finding the wxPython site-package and libraries located at: ./Contents/Frameworks/libwx ./Contents/Resources/lib/python2.6/wx > #### > # 3.) Running relax with the system-installed python (MacPorts, 2.7.2) > > $ cd /Applications/relax.app/Contents/Resources > $ ./relax > > > > relax 1.3.14 > > Molecular dynamics by NMR data analysis > > Copyright (C) 2001-2006 Edward d'Auvergne > Copyright (C) 2006-2012 the relax development team > > This is free software which you are welcome to modify and redistribute under > the conditions of the > GNU General Public License (GPL). This program, including all modules, is > licensed under the GPL > and comes with absolutely no warranty. For details type 'GPL' within the > relax prompt. > > Assistance in using the relax prompt and scripting interface can be accessed > by typing 'help' within > the prompt. > > ImportError: > dlopen(/Applications/relax.app/Contents/Resources/maths_fns/relax_fit.so, 2): > no suitable image found. Did find: > /Applications/relax.app/Contents/Resources/maths_fns/relax_fit.so: > mach-o, but wrong architecture > Relaxation curve fitting is unavailable, try compiling the C modules. > > Processor fabric: Uni-processor. > > relax> Interesting that that import error occurs. I might have to look at that later once all these issues are sorted out. > #### > # 5.) relax information (relax -i) > $ pwd > /Applications/relax.app/Contents/Resources > alu:Resources martin$ ./relax -i > > > > relax 1.3.14 > > Molecular dynamics by NMR data analysis > > Copyright (C) 2001-2006 Edward d'Auvergne > Copyright (C) 2006-2012 the relax development team > > This is free software which you are welcome to modify and redistribute under > the conditions of the > GNU General Public License (GPL). This program, including all modules, is > licensed under the GPL > and comes with absolutely no warranty. For details type 'GPL' within the > relax prompt. > > Assistance in using the relax prompt and scripting interface can be accessed > by typing 'help' within > the prompt. > > ImportError: > dlopen(/Applications/relax.app/Contents/Resources/maths_fns/relax_fit.so, 2): > no suitable image found. Did find: > /Applications/relax.app/Contents/Resources/maths_fns/relax_fit.so: > mach-o, but wrong architecture > Relaxation curve fitting is unavailable, try compiling the C modules. > > Processor fabric: Uni-processor. > > Hardware information: > Machine: x86_64 > Processor: i386 > Endianness: little > Total RAM size: ? Mb > Total swap size: ? Mb > > Operating system information: > System: Darwin > Release: 11.3.0 > Version: Darwin Kernel Version 11.3.0: Thu Jan 12 18:47:41 > PST 2012; root:xnu-1699.24.23~1/RELEASE_X86_64 > Mac version: 10.7.3 (, , ) x86_64 > Distribution: > Full platform string: Darwin-11.3.0-x86_64-i386-64bit > > Python information: > Architecture: 64bit > Python version: 2.7.2 > Python branch: > Python build: default, Mar 15 2012 17:00:43 > Python compiler: GCC 4.2.1 Compatible Apple Clang 3.0 > (tags/Apple/clang-211.12) > Libc version: > Python implementation: CPython > Python revision: > Python executable: > /opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python > Python flags: sys.flags(debug=0, py3k_warning=0, > division_warning=0, division_new=0, inspect=0, interactive=0, optimize=0, > dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, > tabcheck=0, verbose=0, unicode=0, bytes_warning=0) > Python float info: sys.float_info(max=1.7976931348623157e+308, > max_exp=1024, max_10_exp=308, min=2.2250738585072014e-308, min_exp=-1021, > min_10_exp=-307, dig=15, mant_dig=53, epsilon=2.220446049250313e-16, radix=2, > rounds=1) > Python module path: ['/Applications/relax.app/Contents/Resources', > '/Library/Python/2.7/site-packages/pip-1.1-py2.7.egg', > '/usr/local/lib/wxPython-2.9.1.1/lib/python2.7/site-packages', > '/usr/local/lib/wxPython-2.9.1.1/lib/python2.7/site-packages/wx-2.9.1-osx_cocoa', > > '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', > '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', > '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', > > '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', > > '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', > > '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', > > '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', > > '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', > > '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages', > > '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg-info', > '/Library/Python/2.7/site-packages', > '/usr/local/lib/wxPython-2.9.1.1/lib/python2.7', > '/Applications/relax.app/Contents/Resources/extern/scientific_python/darwin'] > > Python packages (most are optional): > > Package Installed Version Path > minfx True Unknown > /Applications/relax.app/Contents/Resources/minfx > bmrblib True Unknown > /Applications/relax.app/Contents/Resources/bmrblib > numpy True 1.6.1 > /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy > scipy False > wxPython True 2.9.1.1 > /usr/local/lib/wxPython-2.9.1.1/lib/python2.7/site-packages/wx-2.9.1-osx_cocoa/wx > mpi4py False > epydoc False > optparse True 1.5.3 > /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/optparse.pyc > readline True > /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/readline.so > profile True > /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/profile.pyc > bz2 True > /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/bz2.so > gzip True > /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/gzip.pyc > os.devnull True > /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.pyc > > Compiled relax C modules: > Relaxation curve fitting: False Ok, this clearly shows that everything is mixed up! All the paths are completely incorrect! The python executable is located in /opt/local, when it must be within /Applications/relax.app/. Without question, everything should be within /Applications/relax.app! The relax Mac Application is clearly broken. > #### > # 6.) Running relax -g with the system-installed python (MacPorts, 2.7.2) > # wxPython 2.9.1.1 (official installer) is installed and can be imported! > # this points to a broken installation on my side > > ./relax -g > 2012-04-04 14:32:26.347 Python[80598:f0b] *** Assertion failure in > -[NSToolbar _forceInsertItem:atIndex:], > /SourceCache/AppKit/AppKit-1138.32/Toolbar.subproj/NSToolbar.m:1309 > 2012-04-04 14:32:26.349 Python[80598:f0b] An uncaught exception was raised > 2012-04-04 14:32:26.350 Python[80598:f0b] Invalid parameter not satisfying: > index>=0 && index<=[self _numberOfItems] > 2012-04-04 14:32:26.356 Python[80598:f0b] ( > 0 CoreFoundation 0x00007fff902effc6 > __exceptionPreprocess + 198 > 1 libobjc.A.dylib 0x00007fff8634dd5e > objc_exception_throw + 43 > 2 CoreFoundation 0x00007fff902efdfa > +[NSException raise:format:arguments:] + 106 > 3 Foundation 0x00007fff87696743 > -[NSAssertionHandler > handleFailureInMethod:object:file:lineNumber:description:] + 169 > 4 AppKit 0x00007fff8aa24f5e -[NSToolbar > _forceInsertItem:atIndex:] + 163 > 5 AppKit 0x00007fff8aa24d35 -[NSToolbar > _insertItem:atIndex:notifyDelegate:notifyView:notifyFamilyAndUpdateDefaults:] > + 121 > 6 AppKit 0x00007fff8aa24a70 -[NSToolbar > _insertNewItemWithItemIdentifier:atIndex:propertyListRepresentation:notifyFlags:] > + 118 > 7 libwx_osx_cocoau-2.9.1.0.0.dylib 0x0000000109a3330b > _ZN9wxToolBar7RealizeEv + 1531 > 8 _controls_.so 0x000000010b13ab76 > _wrap_ToolBarBase_Realize + 102 > 9 Python 0x0000000108722bfa > PyEval_EvalFrameEx + 9706 > 10 Python 0x00000001087205b9 > PyEval_EvalCodeEx + 2201 > 11 Python 0x00000001087283b9 > fast_function + 313 > 12 Python 0x00000001087222be > PyEval_EvalFrameEx + 7342 > 13 Python 0x0000000108728343 > fast_function + 195 > 14 Python 0x00000001087222be > PyEval_EvalFrameEx + 7342 > 15 Python 0x00000001087205b9 > PyEval_EvalCodeEx + 2201 > 16 Python 0x00000001086b388e > function_call + 350 > 17 Python 0x000000010868efd1 > PyObject_Call + 97 > 18 Python 0x000000010869aff6 > instancemethod_call + 470 > 19 Python 0x000000010868efd1 > PyObject_Call + 97 > 20 Python 0x00000001086e920b > slot_tp_init + 187 > 21 Python 0x00000001086e0b9a type_call + > 362 > 22 Python 0x000000010868efd1 > PyObject_Call + 97 > 23 Python 0x00000001087224cf > PyEval_EvalFrameEx + 7871 > 24 Python 0x00000001087205b9 > PyEval_EvalCodeEx + 2201 > 25 Python 0x00000001086b388e > function_call + 350 > 26 Python 0x000000010868efd1 > PyObject_Call + 97 > 27 Python 0x000000010869aff6 > instancemethod_call + 470 > 28 Python 0x000000010868efd1 > PyObject_Call + 97 > 29 Python 0x0000000108727b01 > PyEval_CallObjectWithKeywords + 177 > 30 _core_.so 0x00000001094d5c5e > _ZN7wxPyApp13_BootstrapAppEv + 766 > 31 _core_.so 0x0000000109514cfb > _wrap_PyApp__BootstrapApp + 75 > 32 Python 0x0000000108722bfa > PyEval_EvalFrameEx + 9706 > 33 Python 0x00000001087205b9 > PyEval_EvalCodeEx + 2201 > 34 Python 0x00000001087283b9 > fast_function + 313 > 35 Python 0x00000001087222be > PyEval_EvalFrameEx + 7342 > 36 Python 0x00000001087205b9 > PyEval_EvalCodeEx + 2201 > 37 Python 0x00000001087283b9 > fast_function + 313 > 38 Python 0x00000001087222be > PyEval_EvalFrameEx + 7342 > 39 Python 0x00000001087205b9 > PyEval_EvalCodeEx + 2201 > 40 Python 0x00000001086b388e > function_call + 350 > 41 Python 0x000000010868efd1 > PyObject_Call + 97 > 42 Python 0x000000010869aff6 > instancemethod_call + 470 > 43 Python 0x000000010868efd1 > PyObject_Call + 97 > 44 Python 0x00000001086e920b > slot_tp_init + 187 > 45 Python 0x00000001086e0b9a type_call + > 362 > 46 Python 0x000000010868efd1 > PyObject_Call + 97 > 47 Python 0x00000001087224cf > PyEval_EvalFrameEx + 7871 > 48 Python 0x0000000108728343 > fast_function + 195 > 49 Python 0x00000001087222be > PyEval_EvalFrameEx + 7342 > 50 Python 0x0000000108728343 > fast_function + 195 > 51 Python 0x00000001087222be > PyEval_EvalFrameEx + 7342 > 52 Python 0x0000000108728343 > fast_function + 195 > 53 Python 0x00000001087222be > PyEval_EvalFrameEx + 7342 > 54 Python 0x00000001087205b9 > PyEval_EvalCodeEx + 2201 > 55 Python 0x00000001087283b9 > fast_function + 313 > 56 Python 0x00000001087222be > PyEval_EvalFrameEx + 7342 > 57 Python 0x00000001087205b9 > PyEval_EvalCodeEx + 2201 > 58 Python 0x000000010871fd16 > PyEval_EvalCode + 54 > 59 Python 0x0000000108747b4e > PyRun_FileExFlags + 174 > 60 Python 0x0000000108747528 > PyRun_SimpleFileExFlags + 424 > 61 Python 0x000000010875b63e Py_Main + > 2990 > 62 Python 0x000000010867bf24 Python + > 3876 > 63 ??? 0x0000000000000003 0x0 + 3 > ) > 2012-04-04 14:32:26.358 Python[80598:f0b] *** Terminating app due to uncaught > exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not > satisfying: index>=0 && index<=[self _numberOfItems]' > *** First throw call stack: > ( > 0 CoreFoundation 0x00007fff902effc6 > __exceptionPreprocess + 198 > 1 libobjc.A.dylib 0x00007fff8634dd5e > objc_exception_throw + 43 > 2 CoreFoundation 0x00007fff902efdfa > +[NSException raise:format:arguments:] + 106 > 3 Foundation 0x00007fff87696743 > -[NSAssertionHandler > handleFailureInMethod:object:file:lineNumber:description:] + 169 > 4 AppKit 0x00007fff8aa24f5e -[NSToolbar > _forceInsertItem:atIndex:] + 163 > 5 AppKit 0x00007fff8aa24d35 -[NSToolbar > _insertItem:atIndex:notifyDelegate:notifyView:notifyFamilyAndUpdateDefaults:] > + 121 > 6 AppKit 0x00007fff8aa24a70 -[NSToolbar > _insertNewItemWithItemIdentifier:atIndex:propertyListRepresentation:notifyFlags:] > + 118 > 7 libwx_osx_cocoau-2.9.1.0.0.dylib 0x0000000109a3330b > _ZN9wxToolBar7RealizeEv + 1531 > 8 _controls_.so 0x000000010b13ab76 > _wrap_ToolBarBase_Realize + 102 > 9 Python 0x0000000108722bfa > PyEval_EvalFrameEx + 9706 > 10 Python 0x00000001087205b9 > PyEval_EvalCodeEx + 2201 > 11 Python 0x00000001087283b9 > fast_function + 313 > 12 Python 0x00000001087222be > PyEval_EvalFrameEx + 7342 > 13 Python 0x0000000108728343 > fast_function + 195 > 14 Python 0x00000001087222be > PyEval_EvalFrameEx + 7342 > 15 Python 0x00000001087205b9 > PyEval_EvalCodeEx + 2201 > 16 Python 0x00000001086b388e > function_call + 350 > 17 Python 0x000000010868efd1 > PyObject_Call + 97 > 18 Python 0x000000010869aff6 > instancemethod_call + 470 > 19 Python 0x000000010868efd1 > PyObject_Call + 97 > 20 Python 0x00000001086e920b > slot_tp_init + 187 > 21 Python 0x00000001086e0b9a type_call + > 362 > 22 Python 0x000000010868efd1 > PyObject_Call + 97 > 23 Python 0x00000001087224cf > PyEval_EvalFrameEx + 7871 > 24 Python 0x00000001087205b9 > PyEval_EvalCodeEx + 2201 > 25 Python 0x00000001086b388e > function_call + 350 > 26 Python 0x000000010868efd1 > PyObject_Call + 97 > 27 Python 0x000000010869aff6 > instancemethod_call + 470 > 28 Python 0x000000010868efd1 > PyObject_Call + 97 > 29 Python 0x0000000108727b01 > PyEval_CallObjectWithKeywords + 177 > 30 _core_.so 0x00000001094d5c5e > _ZN7wxPyApp13_BootstrapAppEv + 766 > 31 _core_.so 0x0000000109514cfb > _wrap_PyApp__BootstrapApp + 75 > 32 Python 0x0000000108722bfa > PyEval_EvalFrameEx + 9706 > 33 Python 0x00000001087205b9 > PyEval_EvalCodeEx + 2201 > 34 Python 0x00000001087283b9 > fast_function + 313 > 35 Python 0x00000001087222be > PyEval_EvalFrameEx + 7342 > 36 Python 0x00000001087205b9 > PyEval_EvalCodeEx + 2201 > 37 Python 0x00000001087283b9 > fast_function + 313 > 38 Python 0x00000001087222be > PyEval_EvalFrameEx + 7342 > 39 Python 0x00000001087205b9 > PyEval_EvalCodeEx + 2201 > 40 Python 0x00000001086b388e > function_call + 350 > 41 Python 0x000000010868efd1 > PyObject_Call + 97 > 42 Python 0x000000010869aff6 > instancemethod_call + 470 > 43 Python 0x000000010868efd1 > PyObject_Call + 97 > 44 Python 0x00000001086e920b > slot_tp_init + 187 > 45 Python 0x00000001086e0b9a type_call + > 362 > 46 Python 0x000000010868efd1 > PyObject_Call + 97 > 47 Python 0x00000001087224cf > PyEval_EvalFrameEx + 7871 > 48 Python 0x0000000108728343 > fast_function + 195 > 49 Python 0x00000001087222be > PyEval_EvalFrameEx + 7342 > 50 Python 0x0000000108728343 > fast_function + 195 > 51 Python 0x00000001087222be > PyEval_EvalFrameEx + 7342 > 52 Python 0x0000000108728343 > fast_function + 195 > 53 Python 0x00000001087222be > PyEval_EvalFrameEx + 7342 > 54 Python 0x00000001087205b9 > PyEval_EvalCodeEx + 2201 > 55 Python 0x00000001087283b9 > fast_function + 313 > 56 Python 0x00000001087222be > PyEval_EvalFrameEx + 7342 > 57 Python 0x00000001087205b9 > PyEval_EvalCodeEx + 2201 > 58 Python 0x000000010871fd16 > PyEval_EvalCode + 54 > 59 Python 0x0000000108747b4e > PyRun_FileExFlags + 174 > 60 Python 0x0000000108747528 > PyRun_SimpleFileExFlags + 424 > 61 Python 0x000000010875b63e Py_Main + > 2990 > 62 Python 0x000000010867bf24 Python + > 3876 > 63 ??? 0x0000000000000003 0x0 + 3 > ) > terminate called throwing an exceptionAbort trap: 6 wxPython 2.9 is probably to blame here. I don't know if it is production ready yet. > #################################################### > > # some information about the custom python interpreter inside the .app bundle > > $ ./python > python: posix_spawn: /Applications/relax.app/Contents/MacOS/python2.6: No > such file or directory Again, really weird! > # which python is installed on my system > > $ which python > /opt/local/bin/python This is being picked up by the Application and used for the executable (well the framework version of the executable, I'm guessing this is a symlink to it) and for most Python site-packages. > $ python --version > Python 2.7.2 > > # This is MacPorts, as you can see. wxPython 2.9.1.1 for python 2.7 (from the > official installer) can be imported. > > $ python > Python 2.7.2 (default, Mar 15 2012, 17:00:43) > [GCC 4.2.1 Compatible Apple Clang 3.0 (tags/Apple/clang-211.12)] on darwin > Type "help", "copyright", "credits" or "license" for more information. >>>> import wx > Ok, I might send a second message with more info. This is getting too long. Cheers, Edward _______________________________________________ relax (http://www.nmr-relax.com) This is the relax-users mailing list [email protected] To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-users

