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

Home » Public Forums » archive » Help Setting Up IDL Python Bridge Linux
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Help Setting Up IDL Python Bridge Linux [message #93549] Wed, 17 August 2016 13:57 Go to next message
jacobdparker is currently offline  jacobdparker
Messages: 3
Registered: August 2016
Junior Member
I am having trouble getting IDL to be able to see Python. So far I have the following .cshrc setup

setenv PYTHONPATH /usr/local/exelis/idl/bin/bin.linux.x86_64:/usr/local/exelis /idl/lib/bridges
setenv LD_LIBRARY_PATH /usr/local/anaconda3/lib:/usr/local/exelis/idl/bin/bin.linux .x86_64
source /usr/local/exelis/idl/bin/idl_setup

When I installed anaconda it already added itself to my path so I don't believe I need to do it again. This is what I am seeing in the terminal.

jake@george ~ $ tcsh
george:~> python
Python 3.5.2 |Anaconda 4.1.1 (64-bit)| (default, Jul 2 2016, 17:53:06)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.version
'3.5.2 |Anaconda 4.1.1 (64-bit)| (default, Jul 2 2016, 17:53:06) \n[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)]'
>>>
george:~> echo $path
/usr/local/anaconda3/bin /usr/local/sbin /usr/local/bin /usr/sbin /usr/bin /sbin /bin /usr/games /usr/local/games /usr/local/ssw/site/bin /usr/local/ssw/gen/bin /usr/local/ssw/gen/perl
george:~> echo $PYTHONPATH
/usr/local/exelis/idl/bin/bin.linux.x86_64:/usr/local/exelis /idl/lib/bridges
george:~> echo $LD_LIBRARY_PATH
/usr/local/anaconda3/lib:/usr/local/exelis/idl/bin/bin.linux .x86_64
george:~> idl
IDL Version 8.5.1 (linux x86_64 m64). (c) 2015, Exelis Visual Information Solutions, Inc., a subsidiary of Harris Corporation.
Installation number: 16236.
Licensed for use by: Montana State University - Solar Physics

IDL> >>>
>>> import sys
% PYTHON::RUN: PYTHON::LOAD: Unable to find a valid Python installation.

I am sure that I am missing something very simple and admit to being pretty new at this stuff. Hopefully getting it up here will help the next newb out along the way.

Thanks in advance,
Jake
Re: Help Setting Up IDL Python Bridge Linux [message #93563 is a reply to message #93549] Fri, 19 August 2016 08:01 Go to previous messageGo to next message
jacobdparker is currently offline  jacobdparker
Messages: 3
Registered: August 2016
Junior Member
Maybe my request was a little to lengthy to interest anyone. Can anyone provide me with more insight into what IDL is trying to do when I run a Python command so that I can more effectively troubleshoot the problem? If I knew where IDL thinks Python should be based on my specified environment variables I may be able to see my problem.

Thanks,
Jake
Re: Help Setting Up IDL Python Bridge Linux [message #93565 is a reply to message #93563] Fri, 19 August 2016 13:33 Go to previous messageGo to next message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
I'm not sure that IDL is compatible with python 3.5. If I look in
$IDL_DIR/bin/bin.linux.x86_64 I find dynamic loadable modules (.dlm files) only for Python 2.7 and 3.4 And if you look at the code for python__define.pro you see that if the Python version is not 2.7 or 3.4 then one gets the message "Unable to find a valid Python installation".

In case anyone from Harris Geospatial is monitoring this: IDL 8.5 was released one year ago (though I think the official release was September 2015). Shouldn't we be expecting IDL 8.6 to be arriving very soon? And I presume it will support Python 3.5?

I suppose one could try to see if the dlm for Python 3.4 will also support Python 3.5 (i.e. edit python__define.pro to force recognition of python 3.5) but I am not hopeful.

--Wayne



On Friday, August 19, 2016 at 11:01:37 AM UTC-4, jacobd...@gmail.com wrote:
> Maybe my request was a little to lengthy to interest anyone. Can anyone provide me with more insight into what IDL is trying to do when I run a Python command so that I can more effectively troubleshoot the problem? If I knew where IDL thinks Python should be based on my specified environment variables I may be able to see my problem.
>
> Thanks,
> Jake
Re: Help Setting Up IDL Python Bridge Linux [message #93566 is a reply to message #93565] Fri, 19 August 2016 15:01 Go to previous message
jacobdparker is currently offline  jacobdparker
Messages: 3
Registered: August 2016
Junior Member
Thanks for the reply. I was just checking back to say that I had solved the problem. You are correct that now python__define.pro doesn't recognize 3.5. I solved the problem by doing the following:

define a python 3.4 environment in anaconda

conda create -n py34 python=3.4 anaconda

then I changed my path in .bashrc from

/home/jake/anaconda3 to /home/jake/anaconda3/envs/py34/bin

now my .cshrc reads the following

setenv PYTHONPATH /usr/local/exelis/idl85/bin/bin.linux.x86_64:/usr/local/exel is/idl85/lib/bridges
setenv LD_LIBRARY_PATH /home/jake/anaconda3/envs/py34/lib:/usr/local/exelis/idl85/b in/bin.linux.x86_64
source /usr/local/exelis/idl85/bin/idl_setup

Thanks for your help.
Jake
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: How convert the grid size from irregular grid to regrid size using CMIP5 model in IDL?
Next Topic: area and intensity threshold in images

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

Current Time: Wed Oct 08 07:15:00 PDT 2025

Total time taken to generate the page: 0.00462 seconds