树莓派多版本python设置默认python3

如果有的系统没有自带的3.4版本,需要安装一下

sudo apt-get install python3
  • 1

然后把python的链接删掉

sudo rm /usr/bin/python
  • 1

新建一个链接

sudo ln -s /usr/bin/python3.4 /usr/bin/python
  • 1

查看一下版本

python
  • 1

显示为:

Python 3.5.2 (default, Nov 17 2016, 17:05:23) 
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.

你可能感兴趣的:(树莓)