Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <2017 Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <2017
<== Date ==> <== Thread ==>

Subject: Re: Problem installing PyEpics
From: Matt Newville <newville@cars.uchicago.edu>
To: Pete Jemian <jemian@anl.gov>
Cc: EPICS Tech Talk <tech-talk@aps.anl.gov>
Date: Mon, 30 Jan 2017 15:09:40 -0600
Hi Allan, Pete,


On Mon, Jan 30, 2017 at 12:49 PM, Pete Jemian <jemian@anl.gov> wrote:
Alan:

You reported a Python 2.7 error when loading PyEpics from a non-interactive Linux session:

>   File
> "/home/akastengren/anaconda2/lib/python2.7/site-packages/epics/ca.py",
> line 217, in initialize_libca
>     raise ChannelAccessException('loading Epics CA DLL failed: ' +
> str(exc))
> epics.ca.ChannelAccessException: loading Epics CA DLL failed:
> /home/akastengren/anaconda2/bin/../lib/libreadline.so.6: undefined
> symbol: PC

user@host ~$ nm /home/akastengren/anaconda2/lib/libreadline.so.6 | grep PC
                     U PC

The "U" means the symbol is undefined

I get the same thing (with my Anaconda installations).  This is an Anaconda Python issue with the readline support.  The closest web answer I can find is here:
http://stackoverflow.com/questions/29944238/importerror-when-using-rpy2-with-numpy-testing

The selected "best" answer describes three steps as the suggested fix:

1. delete __pycache__ directory (does not apply, you have Python 2.7, not Python3
2. conda install -c asmeurer readline
3. Inside the .py file, add "import readline"

Step 2, do it from the command line.  Updates readline to 6.2.5
Step 3, insert this into epics/ca.py at (or near) line 26
(/home/akastengren/anaconda2/lib/python2.7/site-packages/epics/ca.py)

Report back whether or not this helps.
 
Pete

--
----------------------------------------------------------
Pete R. Jemian, Ph.D.                <jemian@anl.gov>
Beam line Controls and Data Acquisition, Group Leader
Advanced Photon Source,   Argonne National Laboratory
Argonne, IL  60439                   630 - 252 - 3189
-----------------------------------------------------------
   Education is the one thing for which people
      are willing to pay yet not receive.
-----------------------------------------------------------


Thanks Pete.  I think several people have been bitten by these readline issues with Anaconda's version of readline vs libca's version of readline.  I think I've only solved this one at a time on individual linux machines.

I'd be curious if step 3 (explicit import of readline in ca.py) is necessary and if we should try to add that. It might also be useful to have the conda package for pyepics depend on the asmeurer/readline package.

A larger-scale question would be:  why do libca.so and libCom.so need to be linked against libreadline? I would have thought that readline would be something that iocsh needs, but not libca / libCom.
 
--Matt Newville


Replies:
Re: Problem installing PyEpics Andrew Johnson
References:
Problem installing PyEpics Alan Kastengren
Re: Problem installing PyEpics Pete Jemian

Navigate by Date:
Prev: Re: Problem installing PyEpics Pete Jemian
Next: Re: Problem installing PyEpics Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <2017
Navigate by Thread:
Prev: Re: Problem installing PyEpics Pete Jemian
Next: Re: Problem installing PyEpics Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <2017
ANJ, 14 Feb 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·