[Tutor] Multiple versions of python and paths problems

David Hutto smokefloat at gmail.com
Mon Sep 6 21:01:03 CEST 2010


On Mon, Sep 6, 2010 at 1:46 PM, Dominique <mydomdom at gmail.com> wrote:
> Hello,
>
> I usually use python 2.6 and several packages. Everything's fine.
>
> At present, I'm trying to run a package which is only available with python 2.5.
> So, i installed 2.5 and the various dependencies needed to run this package:
> PIL, numpy... which were already installed in my 2.6 site-packages.
>
> Unfortunately, when I try to run it under Idle 2.5, python goes in the 2.6
> site-packages to get these dependencies (PIL,...) and throws me a traceback (due
> to incompatibilities).
>
> I understand it is a paths problem.
>
> So, I added the path of python 2.5 and that of my application to the path and
> Pythonpath in the windows environ variables.
> But the same problems arise.
>
> So, I tried to load the normal 2.5 Idle and unload ('remove') everything related
> to 2.6 from sys.path, but it's strangely not working completely.
>
> Finally, I managed to run the program :
> - by launching D:\python25\python.exe -E -S in a console (which seems to prevent
> python from loading the paths)
> - then appending the application path to sys.path
> but it's really not fun working with this bloody windows console where cut and
> paste is impossible...
>
> So, here is my question:
> How can I force py2.5 to go and find the dependencies only in the 2.5
> site-packages ?
>
> Thanks in advance for your help.
>
> Dominique
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>
forgot to hit reply all
>From wht the ole swiss cheese kinda recalls, just cd into the 2.5 main
dir from the windows command propmpt, and then you should be able to
type python /path/to/2.5/idlelib/idle.py, or whatever is on your
system.

If that's not it, then let me know, and I'll switch os's to make sure
what it was.

Also, there is a list specifically for window's python. pywin32.


More information about the Tutor mailing list