mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-01 03:34:32 +02:00
Merge branch 'bugfix/py23_packages' into 'master'
Improve the Python package installation procedure See merge request idf/esp-idf!3222
This commit is contained in:
@@ -298,7 +298,7 @@ All remaining applications are `Python <https://www.python.org/>`_ packages and
|
|||||||
::
|
::
|
||||||
|
|
||||||
cd ~/esp/esp-idf/docs
|
cd ~/esp/esp-idf/docs
|
||||||
pip install -r requirements.txt
|
pip install --user -r requirements.txt
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
|
@@ -17,7 +17,7 @@ To compile with ESP-IDF you need to get the following packages:
|
|||||||
|
|
||||||
- Ubuntu and Debian::
|
- Ubuntu and Debian::
|
||||||
|
|
||||||
sudo apt-get install git wget libncurses-dev flex bison gperf python python-serial cmake ninja-build ccache
|
sudo apt-get install git wget libncurses-dev flex bison gperf python python-pip python-setuptools python-serial cmake ninja-build ccache
|
||||||
|
|
||||||
- Arch::
|
- Arch::
|
||||||
|
|
||||||
|
@@ -15,7 +15,7 @@ To compile with ESP-IDF you need to get the following packages:
|
|||||||
|
|
||||||
- Ubuntu and Debian::
|
- Ubuntu and Debian::
|
||||||
|
|
||||||
sudo apt-get install git wget libncurses-dev flex bison gperf python python-serial cmake ninja-build ccache
|
sudo apt-get install git wget libncurses-dev flex bison gperf python python-pip python-setuptools python-serial cmake ninja-build ccache
|
||||||
|
|
||||||
- Arch::
|
- Arch::
|
||||||
|
|
||||||
|
@@ -23,7 +23,7 @@ Install Prerequisites
|
|||||||
|
|
||||||
- install pyserial::
|
- install pyserial::
|
||||||
|
|
||||||
sudo pip install pyserial
|
pip install --user pyserial
|
||||||
|
|
||||||
- install CMake & Ninja build:
|
- install CMake & Ninja build:
|
||||||
|
|
||||||
|
@@ -15,7 +15,7 @@ ESP-IDF will use the version of Python installed by default on Mac OS.
|
|||||||
|
|
||||||
- install pyserial::
|
- install pyserial::
|
||||||
|
|
||||||
sudo pip install pyserial
|
pip install --user pyserial
|
||||||
|
|
||||||
- install CMake & Ninja build:
|
- install CMake & Ninja build:
|
||||||
|
|
||||||
|
@@ -42,7 +42,7 @@ The "Customise" step of the Python installer gives a list of options. The last o
|
|||||||
|
|
||||||
Once Python is installed, open a Windows Command Prompt from the Start menu and run the following command::
|
Once Python is installed, open a Windows Command Prompt from the Start menu and run the following command::
|
||||||
|
|
||||||
pip install pyserial
|
pip install --user pyserial
|
||||||
|
|
||||||
MConf for IDF
|
MConf for IDF
|
||||||
^^^^^^^^^^^^^
|
^^^^^^^^^^^^^
|
||||||
|
@@ -143,10 +143,6 @@ 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::
|
Python packages required by ESP-IDF are located in the ``$IDF_PATH/requirements.txt`` file. You can install them by running::
|
||||||
|
|
||||||
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::
|
|
||||||
|
|
||||||
python -m pip install --user -r $IDF_PATH/requirements.txt
|
python -m pip install --user -r $IDF_PATH/requirements.txt
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
@@ -155,7 +151,7 @@ or you can use the following command for installing them into the user install d
|
|||||||
interpreter can be checked by running command ``python --version`` and depending on the result, you might want to
|
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.::
|
use ``python2``, ``python2.7`` or similar instead of ``python``, e.g.::
|
||||||
|
|
||||||
sudo python2.7 -m pip install -r $IDF_PATH/requirements.txt
|
python2.7 -m pip install --user -r $IDF_PATH/requirements.txt
|
||||||
|
|
||||||
.. _get-started-start-project:
|
.. _get-started-start-project:
|
||||||
|
|
||||||
|
@@ -12,7 +12,7 @@ To compile with ESP-IDF you need to get the following packages:
|
|||||||
|
|
||||||
- Ubuntu and Debian::
|
- Ubuntu and Debian::
|
||||||
|
|
||||||
sudo apt-get install git wget make libncurses-dev flex bison gperf python python-serial
|
sudo apt-get install git wget make libncurses-dev flex bison gperf python python-pip python-setuptools python-serial
|
||||||
|
|
||||||
- Arch::
|
- Arch::
|
||||||
|
|
||||||
|
@@ -14,7 +14,7 @@ To compile with ESP-IDF you need to get the following packages:
|
|||||||
|
|
||||||
- Ubuntu and Debian::
|
- Ubuntu and Debian::
|
||||||
|
|
||||||
sudo apt-get install gcc git wget make libncurses-dev flex bison gperf python python-serial
|
sudo apt-get install gcc git wget make libncurses-dev flex bison gperf python python-pip python-setuptools python-serial
|
||||||
|
|
||||||
- Arch::
|
- Arch::
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
# This is a list of python packages used to generate documentation. This file is used with pip:
|
# This is a list of python packages used to generate documentation. This file is used with pip:
|
||||||
# pip install -r requirements.txt
|
# pip install --user -r requirements.txt
|
||||||
#
|
#
|
||||||
sphinx==1.6.5
|
sphinx==1.6.5
|
||||||
sphinx-rtd-theme
|
sphinx-rtd-theme
|
||||||
|
@@ -142,12 +142,6 @@ ESP32 是一套 Wi-Fi (2.4 GHz) 和蓝牙 (4.2) 双模解决方案,集成了
|
|||||||
|
|
||||||
ESP-IDF 所依赖的 Python 软件包位于 ``$IDF_PATH/requirements.txt`` 文件中,您可以通过运行以下命令来安装它们:
|
ESP-IDF 所依赖的 Python 软件包位于 ``$IDF_PATH/requirements.txt`` 文件中,您可以通过运行以下命令来安装它们:
|
||||||
|
|
||||||
.. code:: bash
|
|
||||||
|
|
||||||
sudo python -m pip install -r $IDF_PATH/requirements.txt
|
|
||||||
|
|
||||||
如果您没有系统的管理员权限,那么可以使用如下命令来将软件包安装到用户目录中:
|
|
||||||
|
|
||||||
.. code:: bash
|
.. code:: bash
|
||||||
|
|
||||||
python -m pip install --user -r $IDF_PATH/requirements.txt
|
python -m pip install --user -r $IDF_PATH/requirements.txt
|
||||||
@@ -156,7 +150,7 @@ ESP-IDF 所依赖的 Python 软件包位于 ``$IDF_PATH/requirements.txt`` 文
|
|||||||
|
|
||||||
请调用 ESP-IDF 使用的相同版本的 Python 解释器,解释器的版本号可以通过运行命令 ``python --version`` 来获得,根据结果,您可能要使用 ``python2``, ``python2.7`` 或者类似的名字而不是 ``python``,例如::
|
请调用 ESP-IDF 使用的相同版本的 Python 解释器,解释器的版本号可以通过运行命令 ``python --version`` 来获得,根据结果,您可能要使用 ``python2``, ``python2.7`` 或者类似的名字而不是 ``python``,例如::
|
||||||
|
|
||||||
sudo python2.7 -m pip install -r $IDF_PATH/requirements.txt
|
python2.7 -m pip install --user -r $IDF_PATH/requirements.txt
|
||||||
|
|
||||||
.. _get-started-start-project:
|
.. _get-started-start-project:
|
||||||
|
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
- Ubuntu 和 Debian::
|
- Ubuntu 和 Debian::
|
||||||
|
|
||||||
sudo apt-get install git wget make libncurses-dev flex bison gperf python python-serial
|
sudo apt-get install git wget make libncurses-dev flex bison gperf python python-pip python-setuptools python-serial
|
||||||
|
|
||||||
- Arch::
|
- Arch::
|
||||||
|
|
||||||
|
@@ -16,7 +16,7 @@ Linux 平台工具链的标准设置
|
|||||||
|
|
||||||
- Ubuntu and Debian::
|
- Ubuntu and Debian::
|
||||||
|
|
||||||
sudo apt-get install gcc git wget make libncurses-dev flex bison gperf python python-serial
|
sudo apt-get install gcc git wget make libncurses-dev flex bison gperf python python-pip python-setuptools python-serial
|
||||||
|
|
||||||
- Arch::
|
- Arch::
|
||||||
|
|
||||||
|
@@ -1,5 +1,9 @@
|
|||||||
# This is a list of python packages needed for ESP-IDF. This file is used with pip.
|
# 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.
|
# Please see the Get Started section of the ESP-IDF Programming Guide for further information.
|
||||||
#
|
#
|
||||||
|
setuptools
|
||||||
|
# The setuptools package is required to install source distributions and on some systems is not installed by default.
|
||||||
|
# Please keep it as the first item of this list.
|
||||||
|
#
|
||||||
pyserial>=3.0
|
pyserial>=3.0
|
||||||
future>=0.16.0
|
future>=0.16.0
|
||||||
|
@@ -47,7 +47,7 @@ if __name__ == "__main__":
|
|||||||
print('The following Python requirements are not satisfied:')
|
print('The following Python requirements are not satisfied:')
|
||||||
for requirement in not_satisfied:
|
for requirement in not_satisfied:
|
||||||
print(requirement)
|
print(requirement)
|
||||||
print('Please run "{} -m pip install -r {}" for resolving the issue.'.format(sys.executable, args.requirements))
|
print('Please run "{} -m pip install --user -r {}" for resolving the issue.'.format(sys.executable, args.requirements))
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
print('Python requirements from {} are satisfied.'.format(args.requirements))
|
print('Python requirements from {} are satisfied.'.format(args.requirements))
|
||||||
|
@@ -190,7 +190,7 @@ The following 3rd party lib is required:
|
|||||||
* netifaces
|
* netifaces
|
||||||
* matplotlib (if use Utility.LineChart)
|
* matplotlib (if use Utility.LineChart)
|
||||||
|
|
||||||
These libraries can be installed by running ``pip install -r requirements.txt`` in tiny-test-fw directory.
|
These libraries can be installed by running ``pip install --user -r requirements.txt`` in tiny-test-fw directory.
|
||||||
|
|
||||||
To build document, we need to install ``Sphinx``, ``plantweb`` and ``sphinx-rtd-theme`` (you may replace this with your own theme). ``plantweb`` requires internet access during building document.
|
To build document, we need to install ``Sphinx``, ``plantweb`` and ``sphinx-rtd-theme`` (you may replace this with your own theme). ``plantweb`` requires internet access during building document.
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user