先用which python3命令在Ubuntu中查找到Python3可执行程序的位置
然后alias python='/usr/bin/python3'回车即可。
Ubuntu设置python运行的是python3而不是python2
-
- 帖子: 2
- 注册时间: 2019-04-10 17:21
- 系统: Windows
- zzugyl
- 帖子: 356
- 注册时间: 2011-03-07 17:26
- 系统: Ubuntu 20.04.3 LTS
Re: Ubuntu设置python运行的是python3而不是python2
直接cd到/usr/bin/
删除原来的python 软链接,重新链接到python3.xx的新版本。
删除原来的python 软链接,重新链接到python3.xx的新版本。
常在深闺人未识 一朝成名天下知
-
- 帖子: 2
- 注册时间: 2019-04-10 17:21
- 系统: Windows