• Ubuntu 20.04.3 LTS
  • Windows 11

Ubuntu 20.04 已经安装 python3 ,但输入python 指令时,却收到以下提醒

  1. $ python
  2. Command 'python' not found, did you mean:
  3. command 'python3' from deb python3
  4. command 'python' from deb python-is-python3

但输入 python3 是不会报错的

  1. $ python3
  2. Python 3.8.10 (default, Sep 28 2021, 16:10:42)
  3. [GCC 9.3.0] on linux
  4. Type "help", "copyright", "credits" or "license" for more information.
  5. >>>

安裝 python-is-python3,指令如下

  1. $ sudo apt install python-is-python3

安裝結果如下

还原只需要移除 python-is-python3,移除指令如下

  1. $ sudo apt remove python-is-python3

原文作者:孤飞-博客园

版权声明:本文为孤飞-博客园原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/ranxi169/p/16530147.html