yesterday i install the python interpreter 3.1.1,which is bulit-in ubuntu as version 2.6.4 . and to my dismay ,it cannot work exactly as i expected . that is when i type the "python "in the linux shell :it implements like below:
chrysanthemumwolf@chrysanthemumwolf-laptop:~$ python Python 2.6.4 (r264:75706, Nov 2 2009, 14:38:03) [GCC 4.4.1] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>>
frustrated with it,i try to find the solutions . i remmenber that when i use the python script in vim i add #! /usr/bin/python at the beginning of codes,which means that the interpreter of python is there. so i take a look at it . it did . i also find the python3 in the dir of /usr/bin/, so it means that we do possibly use the interpreter in linux and its shell. so i just just have a try and type the "python3" in shell .well done .it works .
summary : i get it now that the built-in python is used by default . it also can be done by explicitly . if you want to use the others you should do by explicit.below are the test what i done alreadly. so you can take it as a reference.
chrysanthemumwolf@chrysanthemumwolf-laptop:~$ python2.6
Python 2.6.4 (r264:75706, Nov 2 2009, 14:38:03)
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
KeyboardInterrupt
>>>
chrysanthemumwolf@chrysanthemumwolf-laptop:~$ python2
Python 2.6.4 (r264:75706, Nov 2 2009, 14:38:03)
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
chrysanthemumwolf@chrysanthemumwolf-laptop:~$ python3
Python 3.1.1+ (r311:74480, Oct 11 2009, 20:22:16)
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
chrysanthemumwolf@chrysanthemumwolf-laptop:~$ python3.1
Python 3.1.1+ (r311:74480, Oct 11 2009, 20:22:16)
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
chrysanthemumwolf@chrysanthemumwolf-laptop:~$
notes :
on the way to skill ,you should have a try ,and then try ,the last :try !good luck .
|