40m QIL Cryo_Lab CTN SUS_Lab TCS_Lab OMC_Lab CRIME_Lab FEA ENG_Labs OptContFac Mariner WBEEShop
  40m Log  Not logged in ELOG logo
Entry  Tue Nov 4 19:17:53 2014, ericq, Update, Computer Scripts / Programs, Anaconda + CDSutils 
    Reply  Sat Nov 8 11:31:51 2014, rana, Update, Computer Scripts / Programs, Anaconda + CDSutils 
Message ID: 10667     Entry time: Tue Nov 4 19:17:53 2014     Reply to this: 10688
Author: ericq 
Type: Update 
Category: Computer Scripts / Programs 
Subject: Anaconda + CDSutils 

I've fallen down the rabbit hole of trying to reconcile our desire for newer versions of the Numpy and Scipy python packages with the use of our handy cdsutils tools. 


I've set up an installation of Anaconda python in /ligo/apps/anaconda. Installing pyepics, nds2, and cdsutils was straightforward, but there were a myriad of odd python packages that cdsutils depends on, that are typically installed at the OS level (python-gst, gobject, glib) which I just manually copied over to the anaconda directories. Also, the version of readline that anaconda ships with is somewhat borked (dark voodoo fix was found here: github link. The issue mentioned there wasn't why I needed the fix. Somehow libreadline was causing pyepics initialization to fail). 

I was initially hoping this kind of exercise would be useful, as having a separate python environment that we control buffers us from the system installation and allows us to use whatever version of packages we want, but the amount of hackery I did to get to get cdsutils to work probably didn't result in the most robust solution. (Maybe there was a better way!)

In any case, I have not changed any of our machines' default paths or environment variables. Instead, I have simply created an alias that points to Anaconda python: "apython"


Example:

controls@pianosa|scriptTesting > cat foo.py
import scipy as sp
import sys
from ezca import Ezca
ez=Ezca()
print 'Python Version: '+ sys.version
print 'ez.read test:' + str(ez.read('LSC-TRY_OUT16'))
print 'Scipy Version: '+sp.__version__
 
controls@pianosa|scriptTesting > python foo.py
Python Version: 2.7.3 (default, Feb 27 2014, 19:58:35)
[GCC 4.6.3]
ez.read test:0.0154613731429
Scipy Version: 0.9.0
 
controls@pianosa|scriptTesting > apython foo.py
Python Version: 2.7.8 |Continuum Analytics, Inc.| (default, Aug 21 2014, 18:22:21)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)]
ez.read test:0.00307549210265
Scipy Version: 0.14.0

Thus, Diego should now be able to complete his script that needs the newer Scipy, as well as CDSutils. 

Final note: I've tested z (read|write|avg) with $PATH modified to have /ligo/apps/anaconda/bin at the start, and they seem to work. If things seem to hold up, maybe we can replace the default command-line python, but its not strictly necessary. 

ELOG V3.1.3-