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 #91888 is a reply to message #91870] Tue, 08 September 2015 17:20 Go to previous messageGo to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
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)...
[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 11:44:04 PDT 2025

Total time taken to generate the page: 0.00445 seconds