Different python versions confusion under Windows Vista x64

Alf P. Steinbach /Usenet alf.p.steinbach+usenet at gmail.com
Mon Jul 19 09:15:10 EDT 2010


* Edward Diener, on 19.07.2010 14:53:
> In Windows Vista x64 I have installed python 2.6 64-bit version and
> python 3.1 64-bit version to separate folders. Within the command
> interpreter I add python 2.6 to the PATH.
>
> In the command interpreter, When I type python somescript.py with an
>
> import sys
> print (sys.version)
>
> in the script, it shows:
>
> 3.1.2 (r312:79149, Mar 20 2010, 22:55:39) [MSC v.1500 64 bit (AMD64)]
>
> In the command interpreter if I type 'python' I see:
>
> Python 2.6.5 (r265:79096, Mar 19 2010, 18:02:59) [MSC v.1500 64 bit
> (AMD64)] on win32
>
> Does anybody have any ideas why this is happening ?

At a guess your description of what's happening is not entirely accurate.

Although it could be, since Windows moves in mysterious ways.

Please try the following commands in sequence, with no other commands:

   python -V
   echo %path%
   ftype python.file
   python somescript.py

Then right-click the command interpreter's title bar to get edit menu. /Mark/ 
the text of your commands and results. Then /copy/ it to the clipboard (note: 
you can't use [Ctrl C] here, use the edit menu or just press Enter). Then post 
the commands and results here, /paste/ them into your message (e.g. [Ctrl V]).

And then, if you haven't already figured it out, somebody probably will. :-)


Cheers & hth.,

- Alf

-- 
blog at <url: http://alfps.wordpress.com>



More information about the Python-list mailing list