[Tutor] Multiple versions of python and paths problems
mydomdom at gmail.com
Tue Sep 7 19:06:23 CEST 2010
David Hutto <smokefloat <at> gmail.com> writes:
> 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.
I have 2 python installed (2.5 and 2.6) and 2 shortcuts on the desktop (1 for
2.5 and 1 for 2.6).
I need to run an app built for 2.5.
If I launch idle for python 2.5 and then import my app, the app fails because
the packages it required are searched by python in the python 2.6 site-packages
(D:\Python26\Lib\site-packages) and not in the directory of python 2.5
It can be clearly seen with the tracebacks.
> Paths, from what I know are lists, and the order is what you want to
> be shown first to your program.
It seems that the order set up in the windows environ variables does not change
anything, ie if I put everything related to python 2.5 before the paths for
python 2.6, the same problem occurs.
Thanks for your help David
More information about the Tutor