切换默认python为Python2或者python3
查看python的地址
whereis python

删除原来的链接,建立新的软链接
sudo rm /usr/bin/python
sudo ln -s /usr/bin/python3.5 /usr/bin/python
完成

本文介绍如何通过修改系统链接,将默认Python版本从Python2切换到Python3,具体步骤包括使用whereis命令查找Python路径,然后利用sudo rm移除旧链接,并创建指向Python3的新软链接。
查看python的地址
whereis python

sudo rm /usr/bin/python
sudo ln -s /usr/bin/python3.5 /usr/bin/python

1697

被折叠的 条评论
为什么被折叠?