comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Error in IDL-Python Bridge
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Error in IDL-Python Bridge [message #91896 is a reply to message #91888] Wed, 09 September 2015 08:05 Go to previous messageGo to previous message
chris_torrence@NOSPAM is currently offline  chris_torrence@NOSPAM
Messages: 528
Registered: March 2007
Senior Member
On Tuesday, September 8, 2015 at 6:20:30 PM UTC-6, Paulo Penteado wrote:
> On Tuesday, September 8, 2015 at 8:20:57 AM UTC-7, Chris Torrence wrote:
>> That sounds like a path issue, either with $PATH or $LD_LIBRARY_PATH. That Py_DecRef is part of the C API for Python, and should be found within the python27.so.
>
> Thanks, Chris. That tip pointed me to a fix for that problem.
>
> I had previously checked that all necessary directories were in PATH, PYTHONPATH and LD_LIBRARY_PATH, and I had checked that the matplotlib import worked directly from Python. But given that I could use Python from IDL, and the problem happened only when importing matplotlib, I assumed it was some missing Python library.
>
> Now, I do see that symbol is defined in Anaconda's libpython2.7.so, which is being found:
>
> $ ldd idl_python27.so
> linux-vdso.so.1 => (0x00007fffe59fe000)
> libpython2.7.so.1.0 => /usr/local/anaconda/lib/libpython2.7.so.1.0 (0x00002adc17360000)
> libc.so.6 => /lib64/libc.so.6 (0x00002adc177a3000)
> libpthread.so.0 => /lib64/libpthread.so.0 (0x00002adc17b63000)
> libdl.so.2 => /lib64/libdl.so.2 (0x00002adc17d7f000)
> libutil.so.1 => /lib64/libutil.so.1 (0x00002adc17f84000)
> libm.so.6 => /lib64/libm.so.6 (0x00002adc18187000)
> /lib64/ld-linux-x86-64.so.2 (0x000000314c000000)
>
> It is weird that it does not get found when I try to import the library from IDL (even an ldd spawned from IDL did find the library), but a LD_PRELOAD before starting IDL (export LD_PRELOAD=/usr/local/anaconda/lib/libpython2.7.so.1.0) does fix that problem.
>
> Now, the only problem is a segfault when trying to display a plot (doing a plt.show() in the example)...

Hmmmm. A segfault doesn't sound good. I found some online articles about problems with matplotlib 1.3, and people had gone back to an earlier version (1.2?) which fixed it.

Does the problem only happen when using matplotlib from within IDL, or does it occur in Python as well?

What happens if you download anaconda 3.x and try that instead? Not that you necessarily want to convert to Python 3, but at least it would give you confidence that your environment variables were set up correctly...

-Chris
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Another idiosyncracy?
Next Topic: launch a file

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:55:13 PDT 2025

Total time taken to generate the page: 0.00406 seconds