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

Home » Public Forums » archive » "Unable to find a valid Python installation" error, a python__define error ?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
"Unable to find a valid Python installation" error, a python__define error ? [message #91773] Tue, 25 August 2015 04:16 Go to previous message
Kallisthène is currently offline  Kallisthène
Messages: 15
Registered: October 2012
Junior Member
Dear all,


I had difficulties using the Python bridge with my own winpython installation and I received the 'Unable to find a valid Python installation.' error message.

Thus after spending a lot of time in Windows innards, I just opened the python__define.pro file and found the following piece of code :

; Determine which Python version to load.
SPAWN, ['python', '--version'], stdout, stderr, /noshell
if (stderr[0].Contains('Python 2.7')) then begin
DLM_LOAD, 'Python27'
endif else if (stderr[0].Contains('Python 3.4')) then begin
DLM_LOAD, 'Python34'
endif else begin
MESSAGE, 'Unable to find a valid Python installation.'
endelse

Simply by replacing stderr[0] by the correct stdout[0] I succeeded in fully using Python in IDL as well as the IDL notebook.

What is strange is that a previous anaconda installation worked perfectly well, as well as an earlier winpython 2.7. I have no explanation.

By the way, the 3.5 Python will be released in one month, maybe you should update this piece of code ?

Hope it helps those with similar issues
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: make_map help
Next Topic: coregistering images - help needed

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

Current Time: Wed Oct 08 09:19:38 PDT 2025

Total time taken to generate the page: 0.00396 seconds