mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-27 19:13:21 +00:00
Tools: add Python 2 deprecation warning
This commit is contained in:
@@ -15,15 +15,17 @@ To compile with ESP-IDF you need to get the following packages:
|
||||
|
||||
- CentOS 7::
|
||||
|
||||
sudo yum install git wget ncurses-devel flex bison gperf python pyserial python-pyelftools cmake ninja-build ccache
|
||||
sudo yum -y update && sudo yum install git wget ncurses-devel flex bison gperf python3 python3-pip cmake ninja-build ccache
|
||||
|
||||
CentOS 7 is still supported but CentOS version 8 is recommended for a better user experience.
|
||||
|
||||
- Ubuntu and Debian::
|
||||
|
||||
sudo apt-get install git wget libncurses-dev flex bison gperf python python-pip python-setuptools python-serial python-click python-cryptography python-future python-pyparsing python-pyelftools cmake ninja-build ccache libffi-dev libssl-dev
|
||||
sudo apt-get install git wget libncurses-dev flex bison gperf python3 python3-pip python3-setuptools python3-serial python3-cryptography python3-future python3-pyparsing python3-pyelftools cmake ninja-build ccache libffi-dev libssl-dev dfu-util
|
||||
|
||||
- Arch::
|
||||
|
||||
sudo pacman -S --needed gcc git make ncurses flex bison gperf python-pyserial python-click python-cryptography python-future python-pyparsing python-pyelftools cmake ninja ccache
|
||||
sudo pacman -Sy --needed gcc git make ncurses flex bison gperf python-pyserial python-cryptography python-future python-pyparsing python-pyelftools cmake ninja ccache dfu-util
|
||||
|
||||
.. note::
|
||||
CMake version 3.5 or newer is required for use with ESP-IDF. Older Linux distributions may require updating, enabling of a "backports" repository, or installing of a "cmake3" package rather than "cmake".
|
||||
@@ -35,7 +37,7 @@ Compile the Toolchain from Source
|
||||
|
||||
- CentOS 7::
|
||||
|
||||
sudo yum install gawk gperf grep gettext ncurses-devel python python-devel automake bison flex texinfo help2man libtool make
|
||||
sudo yum install gawk gperf grep gettext ncurses-devel python3 python3-devel automake bison flex texinfo help2man libtool make
|
||||
|
||||
- Ubuntu pre-16.04::
|
||||
|
||||
@@ -51,7 +53,7 @@ Compile the Toolchain from Source
|
||||
|
||||
- Arch::
|
||||
|
||||
TODO
|
||||
sudo pacman -Sy --needed python-pip
|
||||
|
||||
Create the working directory and go into it::
|
||||
|
||||
@@ -72,6 +74,11 @@ Build the toolchain::
|
||||
|
||||
Toolchain will be built in ``~/esp/crosstool-NG/builds/xtensa-esp32-elf``. Follow :ref:`instructions for standard setup <setup-linux-toolchain-add-it-to-path-legacy>` to add the toolchain to your ``PATH``.
|
||||
|
||||
Python 2 deprecation
|
||||
====================
|
||||
|
||||
Python 2 reached its `end of life <https://www.python.org/doc/sunset-python-2/>`_ and support for it in ESP-IDF will be removed soon. Please install Python 3.6 or higher. Instructions for popular Linux distributions are listed above.
|
||||
|
||||
|
||||
Next Steps
|
||||
==========
|
||||
|
||||
@@ -11,11 +11,13 @@ To compile with ESP-IDF you need to get the following packages:
|
||||
|
||||
- CentOS 7::
|
||||
|
||||
sudo yum install git wget flex bison gperf python cmake ninja-build ccache
|
||||
sudo yum -y update && sudo yum install git wget flex bison gperf python3 cmake ninja-build ccache
|
||||
|
||||
CentOS 7 is still supported but CentOS version 8 is recommended for a better user experience.
|
||||
|
||||
- Ubuntu and Debian::
|
||||
|
||||
sudo apt-get install git wget flex bison gperf python python-pip python-setuptools cmake ninja-build ccache libffi-dev libssl-dev
|
||||
sudo apt-get install git wget flex bison gperf python3 python3-pip python3-setuptools cmake ninja-build ccache libffi-dev libssl-dev dfu-util
|
||||
|
||||
- Arch::
|
||||
|
||||
@@ -32,20 +34,47 @@ Permission issues /dev/ttyUSB0
|
||||
|
||||
With some Linux distributions you may get the ``Failed to open port /dev/ttyUSB0`` error message when flashing the ESP32. :ref:`This can be solved by adding the current user to the dialout group<linux-dialout-group>`.
|
||||
|
||||
Setting up Python 3 as default for CentOS
|
||||
-----------------------------------------
|
||||
|
||||
CentOS 7 and older is 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 yum -y update && sudo yum install python3 python3-pip python3-setuptools
|
||||
|
||||
Making Python 3 the default interpreter is possible by running::
|
||||
|
||||
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 10 && alias pip=pip3
|
||||
|
||||
Setting up Python 3 as default for Ubuntu and Debian
|
||||
----------------------------------------------------
|
||||
|
||||
Ubuntu and Debian are still providing Python 2.7 as the default interpreter. Python 3 can be installed as follows::
|
||||
Ubuntu (version 18.04 and older) and Debian (version 9 and older) 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
|
||||
|
||||
Making Python 3 the default interpreter is possible by running::
|
||||
|
||||
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 10
|
||||
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 10 && alias pip=pip3
|
||||
|
||||
.. note::
|
||||
This is system-wide change which may affect all of the applications.
|
||||
|
||||
Fixing broken pip on Ubuntu 16.04
|
||||
=================================
|
||||
|
||||
Package ``python3-pip`` could be broken without possibility to upgrade it.
|
||||
Package has to be removed and installed manually using script `get-pip.py <https://bootstrap.pypa.io/get-pip.py>`_.::
|
||||
|
||||
apt remove python3-pip python3-virtualenv; rm -r ~/.local
|
||||
rm -r ~/.espressif/python_env && python get-pip.py
|
||||
|
||||
Python 2 deprecation
|
||||
====================
|
||||
|
||||
Python 2 reached its `end of life <https://www.python.org/doc/sunset-python-2/>`_ and support for it in ESP-IDF will be removed soon. Please install Python 3.6 or higher. Instructions for popular Linux distributions are listed above.
|
||||
|
||||
Next Steps
|
||||
==========
|
||||
|
||||
|
||||
@@ -79,6 +79,10 @@ Build the toolchain::
|
||||
|
||||
Toolchain will be built in ``~/esp/ctng-volume/crosstool-NG/builds/xtensa-esp32-elf``. To use it, you need to add ``~/esp/ctng-volume/crosstool-NG/builds/xtensa-esp32-elf/bin`` to ``PATH`` environment variable.
|
||||
|
||||
Python 2 deprecation
|
||||
====================
|
||||
|
||||
Python 2 reached its `end of life <https://www.python.org/doc/sunset-python-2/>`_ and support for it in ESP-IDF will be removed soon. Please install Python 3.6 or higher. Instructions for macOS are listed above.
|
||||
|
||||
Next Steps
|
||||
==========
|
||||
|
||||
@@ -72,6 +72,11 @@ If the output is similar to ``Python 3.8.5``, your installation has been done su
|
||||
|
||||
This is system-wide change which may affect all of the applications.
|
||||
|
||||
Python 2 deprecation
|
||||
====================
|
||||
|
||||
Python 2 reached its `end of life <https://www.python.org/doc/sunset-python-2/>`_ and support for it in ESP-IDF will be removed soon. Please install Python 3.6 or higher. Instructions for macOS are listed above.
|
||||
|
||||
Next Steps
|
||||
==========
|
||||
|
||||
|
||||
Reference in New Issue
Block a user