山姆的編程實作分享。。。

Sam Blog, Sam Sharing, Sam Studio

2021年1月9日

[Python] Change Python3 as the default version on Ubuntu


Python default version on Ubuntu 18.04 LTS

The default version of Python on Ubuntu 18.04 is Python 2, that is, if you run“python”command in the Terminal,  the Python 2 engine will be executed. Even if you have installed Python 3.5 or higher version.

A solution to change Python3 as the default version

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



熱門文章