我试图将默认python版本设置为python3in Ubuntu 16.04。默认情况下为python2(2.7)。我遵循以下步骤:
update-alternatives --remove python /usr/bin/python2
update-alternatives --install /usr/bin/python python /usr/bin/python3
但是第二条语句出现以下错误,
rejeesh@rejeesh-Vostro-1015:~$ update-alternatives --install /usr/bin/python python /usr/bin/python3
update-alternatives: --install needs <link> <name> <path> <priority>
Use 'update-alternatives --help' for program usage information.
我是Ubuntu的新手,我不知道自己在做什么错。
pythonPython 3 听起来是个坏主意。调用Python 2编写的脚本的默认方式是python my-script-p2.py,而它是python3 my-script-p3.py。我希望许多系统脚本都可以依靠它。