目录

kali切换python2和python3的方法

目录

kali切换python2和python3的方法

打开终端分别输入下面两条命令:

update-alternatives --install /usr/bin/python python /usr/bin/python2 100
update-alternatives --install /usr/bin/python python /usr/bin/python3 150

https://i-blog.csdnimg.cn/blog_migrate/d70c86442cb930587066f0227b5fbfe5.png

然后打开终端输入:python –version

默认的 python3 了.

如果需要重新切换回python只需要在终端输入:

update-alternatives --config python

然后选择你需要的python版本,输入序号回车就可以了

https://i-blog.csdnimg.cn/blog_migrate/67494e15d02361ca0fdf23fb4e41c536.png