[lsst-dm-stack-users] Trying out the Anaconda python with a RHEL6 installation

Heather Kelly heather at slac.stanford.edu
Thu Feb 6 13:34:13 PST 2014


On 2/6/2014 3:11 PM, Heather Kelly wrote:
> On 2/6/2014 12:10 PM, Mario Juric wrote:
>> On 2/6/14, 8:41 , Heather Kelly wrote:
>>>> I think that may fix it.
>>>>
>>> Yes that seems to have done it! Now..a final complication...I'm still
>>> using Winter2013 v6_2.  We use scipy.  I've installed anaconda 1.8.0
>>> which includes scipy 0.13.0 and numpy 1.7.1.  I was thinking to install
>>> scipy 0.13.0 via:
>>> eups distrib install --nolocks scipy 0.13.0+1
>>> However, when I do that..there is a dependency on numpy 1.8.0
>>>
>> Hi Heather,
>> 	I think you shouldn't need to build scipy with EUPS if one is already
>> included w. Anaconda -- that is one of the benefits of using Anaconda.
>>
>> Doesn't "import scipy" just work?
>>
>> Cheers,
> Ah probably so..
> I was dumbly doing a
> setup scipy
> at the command line, since some of our scripts use it
>
> Ok.. so here's the real issue I think..  when I go to run one of our
> scripts that uses scipy, I receive an error:
>
> RuntimeError: module compiled against API version 7 but this version of
> numpy is 6
> Traceback (most recent call last):
>   File
> "/astro/astronfs01/workarea/lsst/software/lsstCameraSensor/eotest/bin/run_sims.py",
> line 13, in <module>
>     from lsst.eotest.sensor.PhotodiodeResponse \
>   File
> "/astro/astronfs01/workarea/lsst/software/lsstCameraSensor/eotest/python/lsst/eotest/sensor/__init__.py",
> line 9, in <module>
>     from fe55_psf import PsfGaussFit
>   File
> "/astro/astronfs01/workarea/lsst/software/lsstCameraSensor/eotest/python/lsst/eotest/sensor/fe55_psf.py",
> line 10, in <module>
>     import scipy.optimize
>   File
> "/astro/astronfs01/workarea/lsst/software/anaconda/1.8.0/lib/python2.7/site-packages/scipy/optimize/__init__.py",
> line 146, in <module>
>     from .optimize import *
>   File
> "/astro/astronfs01/workarea/lsst/software/anaconda/1.8.0/lib/python2.7/site-packages/scipy/optimize/optimize.py",
> line 35, in <module>
>     from .linesearch import (line_search_BFGS, line_search_wolfe1,
>   File
> "/astro/astronfs01/workarea/lsst/software/anaconda/1.8.0/lib/python2.7/site-packages/scipy/optimize/linesearch.py",
> line 16, in <module>
>     from scipy.optimize import minpack2
> ImportError: numpy.core.multiarray failed to import
>
>
> Anaconda came along with numpy 1.7.1, but the DMstack is expecting
> 1.6.2+1..and I suspect downloaded it and used it rather than the
> Anaconda version.  Does that seem possible?
> Similiarly I see matplotlib 1.1.1+2 installed under DM while Anaconda
> has 1.3.1.  Definitely need the Anaconda version of numpy to be used,
> while maybe it doesn't matter for matplotlib.
>
> If I fire up python, I see:
> Python 2.7.5 |Anaconda 1.8.0 (64-bit)| (default, Nov  4 2013, 15:30:26)
> [GCC 4.1.2 20080704 (Red Hat 4.1.2-54)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import numpy
>>>> print numpy.__version__
> 1.6.2
>
> so somehow my environment picks that older version of numpy up rather
> than the Anaconda version.  Help!  :)
>
> Take care,
> Heather
>
> _______________________________________________
> lsst-dm-stack-users mailing list
> lsst-dm-stack-users at lsstcorp.org
> http://listserv.lsstcorp.org/mailman/listinfo/lsst-dm-stack-users

Did a couple more tests..so if I just source loadLSST.sh, my environment
is such that I import numpy, and I get the Anaconda version.  If I then
do a "setup afw"  and restart python and import numpy - then I'm pulling
in numpy 1.6.2 located under the DMstack.

Take care,
Heather



More information about the dm-users mailing list