我试图在python3
中将默认python版本设置为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的新手,我不知道自己在做什么错。
最佳答案
编辑:
我幼稚的时候就写了这个,update-alternatives
是更好的方法。请参阅@Pardhu的答案。
关于python - 无法在ubuntu中将默认python版本设置为python3,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/41986507/