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 #91875 is a reply to message #91870] Tue, 08 September 2015 10:26 Go to previous messageGo to previous message
chuxiangning is currently offline  chuxiangning
Messages: 17
Registered: September 2012
Junior Member
Dear Paulo and Chris,
Thanks for your answers. I checked the folder bin.linux.x86_64, there's no file named python27.so. There are idl_python27.dll and idl_python27.dlm.
When I run the following command, I have no problem:
dlm_load,'python27'
When I run python.import, I got an error below:
plt = Python.Import('matplotlib.pyplot')
% PYTHON_IMPORT: Exception: /usr/local/exelis/idl85/bin/bin.linux.
x86_64/idl: undefined symbol: Py_DecRef.
% Execution halted at: $MAIN$

Just FYI, I've included my system path.

echo $PATH
/PowerEdge/xchu/anaconda/bin:/PowerEdge/xchu/anaconda:/usr/l ib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin :/usr/sbin:/sbin:/home/xnchu/bin
echo $PYTHONPATH: /usr/local/exelis/idl/bin/bin.linux.x86_64:/usr/local/exelis /idl/lib/bridges
echo $LD_LIBRARY_PATH
:/PowerEdge/xchu/anaconda/lib:/usr/local/exelis/idl/bin/bin. linux.x86_64




On Tuesday, September 8, 2015 at 8:20:57 AM UTC-7, Chris Torrence wrote:
> On Monday, September 7, 2015 at 7:17:13 PM UTC-6, Paulo Penteado wrote:
>> On Sunday, September 6, 2015 at 9:02:04 PM UTC-3, chu xiangning wrote:
>>> plt = Python.Import('matplotlib.pyplot')
>>> Error:
>>> % PYTHON_IMPORT: Exception: No module named PySide.
>>> % Execution halted at: $MAIN$
>>>
>>> I don't have problems running "ran = Python.Import('numpy.random')".
>>> I don't have problem running in ipython "import matplotlib.pyplot".
>>>
>>
>> I have seen this exact problem when using a current Anaconda Python, both with Python 2.7 and 3.4. This seems to happen because PySide was dropped in recent versions of Anaconda:
>>
>> "Version 2.0 reduces the size of the installers, adds installers for Python 3.4, updates over 40 packages, and moves from PySide to PyQt"
>> http://continuum.io/blog/anaconda-2-released
>>
>> In the case of Anaconda Python 2.7, I can solve it with its installer:
>>
>> conda install pyside
>>
>> In the case of Anaconda's Python 3.4, PySide does not seem to be in their repository, so I installed it with pip:
>>
>> pip install pyside
>>
>> However, this still does not fix, for me, all the problems with using matplotlib from IDL. What I get next is
>>
>> IDL> plt = Python.Import('matplotlib.pyplot')
>> % Loaded DLM: PYTHON27.
>> % PYTHON_IMPORT: Exception: /usr/local/exelis/idl85/bin/bin.linux.x86_64/idl: undefined symbol:
>> Py_DecRef.
>>
>> I still did not have a chance to look further into this.
>
> Hi Paulo,
>
> 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.
>
> Best of luck!
>
> -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 15:56:33 PDT 2025

Total time taken to generate the page: 0.00252 seconds