[Tutor] Multiple versions of python and paths problems

David Hutto smokefloat at gmail.com
Tue Sep 7 18:00:23 CEST 2010

On Tue, Sep 7, 2010 at 4:03 AM, Dominique <mydomdom at gmail.com> wrote:
> Alan Gauld <alan.gauld <at> btinternet.com> writes:
>> How do you start IDLE? Is it via a desktop or start menu shortcut?
>> If so what is the startin folder specified as?
> Hello,
> First, thanks to you David, Alan and Dave for your help.
> Start with shortcut whose path is : "D:\Python25\python.exe" or
> "D:\Python25\python.exe -E -S".
>> What happens when you run it from the command ine with no extra
>> parameters - what error do you get?
> All paths related to python 2.6 and python 2.5 are imported (visible through
> sys.path)in both cases.
> The error is when launching the app which needs PIL, numpy... from 2.5 and not
> 2.6 (the versions imported are those of 2.6, causing the app to crash)
> Note that paths are not imported only by launching D:\python25\python.exe -E -S
>> Do you have both versions of Python in your environment variables?
> Yes
>> In which order?
> PATH is as follows (one by line):
> %SystemRoot%\system32;
> %SystemRoot%;
> %SystemRoot%\System32\Wbem;
> D:\WINDOWS\system32\WindowsPowerShell\v1.0;
> D:\Program Files\TortoiseSVN\bin;
> D:\Program Files\QuickTime\QTSystem\;
> D:\OpenCV2.1\bin;
> D:\Python26;
> d:\Python26\Scripts;
> D:\Python26\Lib\site-packages;
> D:\Python25;
> D:\Python25\Scripts;
> D:\Python25\Lib\site-packages;
> D:\Python25\Lib\site-packages\pyvision\releases\pyvision_0.8.1\src\;
> D:\Python25\Lib\site-packages\opencv

> PYTHONPATH is as follows:
> D:\Python26\Lib\site-packages;
> D:\Python25\Lib\site-packages;
> D:\Python25\Lib\site-packages\pyvision\releases\pyvision_0.8.1\src\
> Which order should I use ?

If I'm still understanding the original question, if you right click
on a file, in Windows, and it says edit with idle, then idle is the
last version of python idle you've installed. If you call python from
the command prompt then it should be the first c:/pythonversionnumber
in environment variables that is called. so if you have
c:/python25;c:/python26;c:python3 then you should get 2.5 in command
prompt if you type python.

Paths, from what I know are lists, and the order is what you want to
be shown first to your program.
>> Set the Quick Edit option for the terminal it will save you a lot of
>> pain.
> Thanks for the tip !  It's a special cut&paste (you have to right-click on the
> bar to have it work)!!
>> There are probably several ways round it, including creating a local
>> startup file.
> OK
>> But if the paths are right it should work, and you may need to create
>> a startup
>> DOS file to set them before executing python...
> I tried without success...
> How would you do this ?
> Thanks a lot for your help. As usual here!
> Dominique
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor

More information about the Tutor mailing list