第一步:设置python版本

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

第二步:切换python版本, 

sudo update-alternatives --config python

按照提示输入选择数字回车即可。

ubuntu更换默认python版本

这样你甚至可以将自己喜欢的任意版本python安装到任意位置,然后使用update-alternatives将其设置为系统默认python。

参考原文:https://segmentfault.com/q/1010000003713912

相关文章:

  • 2022-02-07
  • 2022-01-10
  • 2022-12-23
  • 2021-12-10
  • 2022-02-13
猜你喜欢
  • 2021-12-19
  • 2022-12-23
  • 2021-12-03
  • 2021-05-05
  • 2021-10-29
  • 2021-06-26
  • 2022-02-09
相关资源
相似解决方案