树莓派 多版本在 linux系统下将python3设置为默认的python

版权声明:欢迎访问Five-菜鸟级的博客 https://blog.csdn.net/qq_41923622/article/details/86529848

直接执行这两个命令即可:

sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 100

sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 150

如果要切换到Python2,执行:

sudo update-alternatives --config python

检验:

猜你喜欢

转载自blog.csdn.net/qq_41923622/article/details/86529848
今日推荐