Explorar el Código

docs: make the use of pip install clear

Roland Dobai hace 7 años
padre
commit
52d11dcfb0
Se han modificado 3 ficheros con 22 adiciones y 6 borrados
  1. 10 2
      docs/en/get-started/index.rst
  2. 10 2
      docs/zh_CN/get-started/index.rst
  3. 2 2
      requirements.txt

+ 10 - 2
docs/en/get-started/index.rst

@@ -143,11 +143,19 @@ Install the Required Python Packages
 
 Python packages required by ESP-IDF are located in the ``$IDF_PATH/requirements.txt`` file. You can install them by running::
 
-    sudo pip install -r $IDF_PATH/requirements.txt
+    sudo python -m pip install -r $IDF_PATH/requirements.txt
 
 or you can use the following command for installing them into the user install directory on systems where you don't have administrator rights::
 
-    pip install --user -r $IDF_PATH/requirements.txt
+    python -m pip install --user -r $IDF_PATH/requirements.txt
+
+.. note::
+
+    Please invoke that version of the Python interpreter which you will be using with ESP-IDF. The version of the
+    interpreter can be checked by running command ``python --version`` and depending on the result, you might want to
+    use ``python2``, ``python2.7`` or similar instead of ``python``, e.g.::
+
+        sudo python2.7 -m pip install -r $IDF_PATH/requirements.txt
 
 .. _get-started-start-project:
 

+ 10 - 2
docs/zh_CN/get-started/index.rst

@@ -142,13 +142,21 @@ ESP-IDF 所依赖的 Python 软件包位于 ``$IDF_PATH/requirements.txt`` 文
 
 .. code:: bash
 
-    sudo pip install -r $IDF_PATH/requirements.txt
+    sudo python -m pip install -r $IDF_PATH/requirements.txt
 
 如果您没有系统的管理员权限,那么可以使用如下命令来将软件包安装到用户目录中:
 
 .. code:: bash
 
-    pip install --user -r $IDF_PATH/requirements.txt
+    python -m pip install --user -r $IDF_PATH/requirements.txt
+
+.. note::
+
+    Please invoke that version of the Python interpreter which you will be using with ESP-IDF. The version of the
+    interpreter can be checked by running command ``python --version`` and depending on the result, you might want to
+    use ``python2``, ``python2.7`` or similar instead of ``python``, e.g.::
+
+        sudo python2.7 -m pip install -r $IDF_PATH/requirements.txt
 
 .. _get-started-start-project:
 

+ 2 - 2
requirements.txt

@@ -1,5 +1,5 @@
-# This is a list of python packages needed for IDF. This file is used with pip:
-# pip install -r requirements.txt
+# This is a list of python packages needed for ESP-IDF. This file is used with pip.
+# Please see the Get Started section of the ESP-IDF Programming Guide for further information.
 #
 pyserial>=3.0
 future>=0.16.0