前几天我决定我希望命令python默认启动python3而不是python2.
所以我这样做了:
sudo update-alternatives --install /usr/bin/python python /usr/bin /python2.7 2
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.5 3
sudo update-alternatives –config python
$sudo update-alternatives --config python
There are 2 choices for the alternative python (providing /usr/bin/python).
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/bin/python3.5 3 auto mode
1 /usr/bin/python2.7 2 manual mode
2 /usr/bin/python3.5 3 manual mode
Press <enter> to keep the current choice[*], or type selection number: 0
这一切都奏效了.大!
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。