[Tutor] Multiple versions of python and paths problems

Dominique mydomdom at gmail.com
Tue Sep 7 10:03:38 CEST 2010


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
in a DOS CONSOLE.

> 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 ?
 
> 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




More information about the Tutor mailing list