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
Re: "Unable to find a valid Python installation" error, a python__define error ? [message #91779 is a reply to message #91773] Tue, 25 August 2015 09:11 Go to previous messageGo to previous message
chris_torrence@NOSPAM is currently offline  chris_torrence@NOSPAM
Messages: 528
Registered: March 2007
Senior Member
On Tuesday, August 25, 2015 at 5:16:30 AM UTC-6, Kallisthène wrote:
> 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

Hi Kallisthène,

Thanks for reporting this. For some reason different flavors of Python uses stdout or stderr, but not consistently. I'll go ahead and update the code to check both.

Cheers,
Chris
[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 11:39:39 PDT 2025

Total time taken to generate the page: 0.00424 seconds