diff --git a/docs/en/get-started/linux-setup.rst b/docs/en/get-started/linux-setup.rst index 69efe04918..b16870745f 100644 --- a/docs/en/get-started/linux-setup.rst +++ b/docs/en/get-started/linux-setup.rst @@ -35,7 +35,7 @@ With some Linux distributions you may get the ``Failed to open port /dev/ttyUSB0 Setting up Python 3 as default for Ubuntu and Debian ---------------------------------------------------- -Ubuntu and Debian are still providing Python 2.7 as the default interpreter but some required packages may be missing for newer distributions. Python 3 is recommended and can be installed as follows:: +Ubuntu (distributions before v20.04) and Debian (distributions before v7) are still providing Python 2.7 as the default interpreter. Python 3 is recommended instead and can be installed in old distributions as follows, or please consult the documentation of your operating system for other recommended ways to achieve this:: sudo apt-get install python3 python3-pip python3-setuptools diff --git a/docs/zh_CN/get-started/linux-setup.rst b/docs/zh_CN/get-started/linux-setup.rst index 38b04a8552..56b3b665ea 100644 --- a/docs/zh_CN/get-started/linux-setup.rst +++ b/docs/zh_CN/get-started/linux-setup.rst @@ -32,6 +32,20 @@ Linux 平台工具链的标准设置 使用某些 Linux 版本向 {IDF_TARGET_NAME} 烧写固件时,可能会出现 ``Failed to open port /dev/ttyUSB0`` 错误消息。此时,可以将当前用户增加至 :ref:` Linux Dialout 组 `。 +设置 Python 3 为 Ubuntu 和 Debian 默认 Python 版本 +---------------------------------------------------- + +Ubuntu v20.04 和 Debian v7 之前的版本默认解释器为 Python 2.7,但这里推荐使用 Python 3,您可以运行下方命令安装 Python 3。或者查看当前所用系统的相关文档,按照文档推荐的其它方法安装 Python 3:: + + sudo apt-get install python3 python3-pip python3-setuptools + +设置 Python 3 为默认 Python 版本:: + + sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 10 + +.. note:: + 上述设置为全局设置,同时会影响到其它应用。 + 后续步骤 ==========