On 5/1/12 4:02 AM, Terence R Wyatt wrote: > > I am trying to use scipy-py27 in conjunction with root5, but am having > version compatibility problems. > > In order to simplify the problem and avoid any problems with the history > or my fink installation, I have wiped my /sw directory and made a > completely new installation of fink. >
That almost never is useful, unless you have changed something else too, since Fink tries to be deterministic. You'll build up the same history that you had before. > fink --version gives > Package manager version: 0.32.6 > Distribution version: selfupdate-rsync Sun Apr 29 13:44:05 2012, 10.7, > x86_64 > Trees: local/main stable/main > > I have then installed only > fink install scipy-py27 > fink install root5 > > In my .bashrc file I have: > export ROOTSYS=/sw > export PATH=$ROOTSYS/bin:$PATH > export LD_LIBRARY_PATH=$ROOTSYS/lib:$LD_LIBRARY_PATH > export PYTHONPATH=/sw/lib/python2.7/site-packages/:/sw/lib/root/: > root5 sets PYTHONPATH already on 10.7. You don't need to do this. > If I then run the version of python installed by fink I am unable to > import ROOT > /sw/bin/python2.7 > Python 2.7.3 (default, Apr 29 2012, 16:14:30) > [GCC 4.2.1 Compatible Apple Clang 2.1 (tags/Apple/clang-163.7.1)] on darwin > Type "help", "copyright", "credits" or "license" for more information. >>>> import ROOT > Fatal Python error: Interpreter not initialized (version mismatch?) > Abort trap: 6 > > In contrast, when I run the version of python (2.7.1) that came > pre-installed on my Mac then I am able to > import ROOT. However, this pre-installed version of python does not > come with scipy. If I try to use scipy > from the fink-installed version this doesn't work. > /usr/bin/python > Python 2.7.1 (r271:86832, Jun 16 2011, 16:59:05) > [GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on > darwin > Type "help", "copyright", "credits" or "license" for more information. >>>> from scipy.optimize import fmin > Fatal Python error: PyThreadState_Get: no current thread > Abort trap: 6 > > I assume this is also due to the version mismatch between 2.7.1 and 2.7.3. > Or because our python packages are built with different options than is the built-in Python. > > Ideally, I'd like to use in a consistent fashion the software I have > installed using fink, since naively > I'd have imagined that would be the best way to ensure a consistent set. > Is there some way of forcing root5 > to be made compatible with the fink-installed python 2.7.3? > > I use a MacBook Pro running OS X 10.7.3. > > Advice would be most welcome. > > > Regards, Terry Wyatt. > > On 10.7 root5 explicitly builds against the built-in Python, so it appears that what you are seeing is the intended behavior. I'm not a Python expert, so I don't know if you can recompile your installed ROOT.py and friends using Fink's python2.7 to work around this issue. Remi would be the one to address the usability question of having root5's python modules not be accessible to Fink's scipy. For Remi: Why didn't you use RuntimeVars to set PYTHONPATH? :-) It looks like you reinvented the wheel here. -- Alexander Hansen, Ph.D. Fink User Liaison http://finkakh.wordpress.com/2012/02/21/got-job/ ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Fink-users mailing list [email protected] List archive: http://news.gmane.org/gmane.os.macosx.fink.user Subscription management: https://lists.sourceforge.net/lists/listinfo/fink-users
