Hi Matt, Actually we did run . /Applications/iXAFS.app/Contents/Resources/local/bin/iff_init.sh (I was just wondering if it was still required).
Hopefully the following output will be clearer than my prose. Line 5 in "iff = Ifeffit.Ifeffit()". The problem seems to be access to "/Users/Newville/Codes/ifeffit/local/share/ifeffit" while running Ifeffit.Ifeffit(). Thanks! Joel + Barb Last login: Fri Sep 10 08:14:26 on ttys004 JoelMacBook-Silver:~ joelb$ echo $PATH /opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin JoelMacBook-Silver:~ joelb$ . /Applications/iXAFS.app/Contents/Resources/local/bin/iff_init.sh JoelMacBook-Silver:~ joelb$ echo $PATH /Applications/iXAFS.app/Contents/Resources/local/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin JoelMacBook-Silver:~ joelb$ cd /Users/joelb/data_ifeffit/APS-April08-Pascal/python JoelMacBook-Silver:python joelb$ python aps-12p9mLiCl.py failed to load ifeffit library libifeffit.dylib /Users/Newville/Codes/ifeffit/local/share/ifeffit:/Applications/iXAFS.app/Contents/Resources/local/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin Traceback (most recent call last): File "aps-12p9mLiCl.py", line 5, in <module> iff = Ifeffit.Ifeffit() File "/Library/Python/2.6/site-packages/Ifeffit/Ifeffit.py", line 79, in __init__ raise ImportError('Cannot load ifeffit library') ImportError: Cannot load ifeffit library JoelMacBook-Silver:python joelb$ echo $PATH /Applications/iXAFS.app/Contents/Resources/local/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin ________________________________________ ------------------------------ Message: 4 Date: Thu, 9 Sep 2010 10:12:09 -0500 From: Matt Newville <newvi...@cars.uchicago.edu> To: XAFS Analysis using Ifeffit <ifeffit@millenia.cars.aps.anl.gov> Cc: "barbara.etschm...@adelaide.edu.au" <barbara.etschm...@adelaide.edu.au> Subject: Re: [Ifeffit] IXAFS3.0.2 and python scripting Message-ID: <aanlktikylawnrcwzwnk+ybl0byp7ngxnj=zrn_v3v...@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Hi Joel and Barb, Ah, sorry. I believe you need to do . /Applications/iXAFS.app/Contents/Resources/local/bin/iff_init.sh in the shell prior to running python, or add this to your bash .profile file. It would be better if the setup procedure detected that it was on a Mac and set the environment up automatically. I'll work on that (and on the build for10.5). --Matt > Works great on 10.6 for us too. Thanks a million times, and fingers crossed > for finding the error in 10.5 ! > > We tried the python scripting, but apparently a /Users/Newville still lurks > in there. > > Running the aps-12p9mLiCl.py ?script > > 1. #!/usr/bin/python > 2. > 3. import math > 4. import Ifeffit > 5. iff = Ifeffit.Ifeffit() > > gives the following error: > > bash-3.2$ python aps-12p9mLiCl.py > ?failed to load ifeffit library ?libifeffit.dylib > /Users/Newville/Codes/ifeffit/local/share/ifeffit:/opt/local/bin:/opt/local/sbin:/opt/pgi/osx86/10.4/bin:/Users/joelb/Public/XDS/XDS-OSX_Intel:/Applications/iXAFS.app/Contents/Resources/local/bin:/opt/local/bin:/opt/local/sbin:/sw/bin:/sw/sbin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/X11R6/bin:/usr/local/lib:/Users/joelb/Desktop/FitYK/:/usr/local/lib/:/sw/lib/:/sw/include/readline/:/unix/Molecular > > Dynamics/moldy-2.16e:/Users/joelb/Public/XDS/XDS-OSX_Intel:/Users/joelb/Desktop/fdmnes:/usr/local/lib:/Users/joelb/Desktop/FitYK/:/usr/local/lib/:/sw/lib/:/sw/include/readline/:/unix/Molecular > > Dynamics/moldy-2.16e:/Users/joelb/Public/XDS/XDS-OSX_Intel:/Users/joelb/Desktop/fdmnes:/Applications/iXAFS.app/Contents/Resources/local/bin > Traceback (most recent call last): > ?File "aps-12p9mLiCl.py", line 5, in <module> > ? ?iff = Ifeffit.Ifeffit() > ?File "/Library/Python/2.6/site-packages/Ifeffit/Ifeffit.py", line 79, in > __init__ > ? ?raise ImportError('Cannot load ifeffit library') > ImportError: Cannot load ifeffit library > > > I tried to add /Applications/iXAFS.app/Contents/Resources/local/lib to PATH > (there's a libifeffit.dylib there), but that did not help. > > Also notice that my PATH variables have been duplicated. This happens because > I still have '. > /Applications/iXAFS.app/Contents/Resources/local/bin/iff_init.sh' in my > '.profile'. Do I need to keep this? If so, it would be nice to fix > iff_init.sh too :-) > > Thanks, > > Joel + Barb > _______________________________________________ Ifeffit mailing list Ifeffit@millenia.cars.aps.anl.gov http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit