python version

 

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 .

 

 
 

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值