04 Aug 2015 04:41 AM |
|
Hi there,
I have a question to the setup of thenew „IDL – python bridge“. I am using windows 8.1 on a 64 bit machine.
I have installed Idl 8.5
I have installed python 3.4.1 (64 bit, plus numpy etc.)
I have put both into the path variableas described in the help files so I can call them individually fromthe cmd shell by simply typing „idl“ and „python“. Now the last step is:
„
As a last step, ensure that IDL can finds its fonts and resourcesby executing the following command within the IDL bindirectory:
source idl_setup
“
Maybe I am missing something very simple here, but I can't find the 'idl_setup' fileanywhere in my bin folder. And simply executing that command from thecmd line does not work either. And calling python routines within idlin the Idl workbench with e.g. „ran =Python.Import('numpy.random')“ does not work either. I amlooking forward for the probably simple solution :).
By the way: If the python-idl bridge works as shown in the help files both ways: Thats awesome! Thanks a lot for implementing it. This was the single most anticipated feature for me (besides the array.ToList() feature which was implemented as well!!!)
Great work, keep it up! I think a little more advertising of these new features on the web can't hurt!
|
|
|
|
Zachary Norman Basic Member
Posts:173  
05 Aug 2015 12:39 PM |
|
Hi Niklas,
I think that the portion of the help that mentions sourcing idl_setup is referring to the portion for installing on Macintosh Platforms. Are you able to get the bridge to work for Windows?
|
|
|
|
Deleted User New Member
Posts:15  
06 Aug 2015 07:49 AM |
|
Dear Zach,
thanks for replying. Oh yes that was a mac bit.. so that can't be the problem. I am able to use python from IDL now. Thats great! That was actually the main goal I had!
Unfortunately I still can't figure out how to import idlpy within python. I guess this should have something to do with the PYTHONPATH variable.
When I am in python I can do the following:
>>> import sys
% Loaded DLM: PYTHON34.
>>> sys.path
['c:\\Program Files\\Exelis\\IDL85\\bin\\bin.x86_64', 'C:\\Users\\keck\\ C:\\Program Files\\Exelis\\IDL85\\lib\\bridges',...]
>>> from idlpy import IDL
% PYTHON::RUN: PYTHON_RUN: Exception: No module named 'idlpy'.
So python does use the PYTHONPATH variable for the sys.path to search for modules in the IDL bridges and bin folders but apparently can't find the python module. I am grateful for any input to find a solution for the problem.
|
|
|
|
Zachary Norman Basic Member
Posts:173  
06 Aug 2015 10:56 AM |
|
HI Niklas,
First I would just double check that PYTHONPATH is set accordingly. What does your value of PYTHONPATH look like if you open up a new command prompt and echo it? Also, it may also be worth restarting your machine if you haven't done so yet. You could always try placing the idlpy.py file (found in C:\Program Files\Exelis\IDL85\lib\bridges) into the bin directory of Python and see if that will let Python find it, but that is not the intended behavior. Just to check, you are using 64 bit Python correct?
|
|
|
|
Deleted User New Member
Posts:15  
06 Aug 2015 12:43 PM |
|
Hi Zach,
thank you for the help. I will test that in September when I am back from vacation and report the results back to the forum.
All the best
Niklas
|
|
|
|