一 准备工作
- 安装pip
sudo easy_install pip
- 安装 CMake 和 Ninja 编译工具
brew install cmake ninja dfu-util
(备注:MacBook无brew安装包的话可以参考此链接安装)
- 同时安装 ccache 以获得更快的编译速度
brew install ccache
二 开始下载ESP-IDF
- 克隆乐鑫官方仓库
mkdir -p ~/esp
cd ~/esp
git clone --recursive https://github.com/espressif/esp-idf.git
- 进入esp-idf目录,开始安装tools和python环境
cd ~/esp/esp-idf
./install.sh
在macbook中安装执行./install.sh
过程出现以下报错:
appledeMBP:esp-idf Snow$ ./install.sh
Installing ESP-IDF tools
Installing tools: xtensa-esp32-elf, xtensa-esp32s2-elf, xtensa-esp32s3-elf, esp32ulp-elf, esp32s2ulp-elf, openocd-esp32
Skipping xtensa-esp32-elf@esp-2020r3-8.4.0 (already installed)
Skipping xtensa-esp32s2-elf@esp-2020r3-8.4.0 (already installed)
Skipping xtensa-esp32s3-elf@esp-2020r3-8.4.0 (already installed)
Skipping esp32ulp-elf@2.28.51-esp-20191205 (already installed)
Skipping esp32s2ulp-elf@2.28.51-esp-20191205 (already installed)
Skipping openocd-esp32@v0.10.0-esp32-20200709 (already installed)
Installing Python environment and packages
Installing Python packages from /Users/apple/esp32_official/src/esp-idf/requirements.txt
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Ignoring None: markers 'sys_platform == "win32"' don't match your environment
Requirement already satisfied: setuptools>=21 in /Users/apple/.espressif/python_env/idf4.3_py2.7_env/lib/python2.7/site-packages (from -r /Users/apple/esp32_official/src/esp-idf/requirements.txt (line 4)) (44.1.1)
Collecting click>=5.0
Using cached click-7.1.2-py2.py3-none-any.whl (82 kB)
Collecting pyserial>=3.0
Using cached pyserial-3.5-py2.py3-none-any.whl (90 kB)
Processing /Users/apple/Library/Caches/pip/wheels/5f/11/0c/aad680baf5ef4fbcbab992c9f03e1130357e0c173a4fdabfff/future-0.18.2-py2-none-any.whl
Collecting cryptography>=2.1.4
Using cached cryptography-3.3.1-cp27-cp27m-macosx_10_10_x86_64.whl (1.8 MB)
Collecting pyparsing<2.4.0,>=2.0.3
Using cached pyparsing-2.3.1-py2.py3-none-any.whl (61 kB)
Collecting pyelftools>=0.22
Using cached pyelftools-0.27-py2.py3-none-any.whl (151 kB)
Collecting gdbgui==0.13.2.0
Using cached gdbgui-0.13.2.0.tar.gz (848 kB)
Collecting pygdbmi<=0.9.0.2
Using cached pygdbmi-0.9.0.2.tar.gz (17 kB)
Collecting kconfiglib==13.7.1
Using cached kconfiglib-13.7.1-py2.py3-none-any.whl (145 kB)
Collecting reedsolo<=1.5.4,>=1.5.3
Using cached reedsolo-1.5.4.tar.gz (271 kB)
Collecting bitstring>=3.1.6
Using cached bitstring-3.1.7.tar.gz (195 kB)
Collecting ecdsa>=0.16.0
Using cached ecdsa-0.16.1-py2.py3-none-any.whl (104 kB)
Collecting enum34; python_version < "3"
Using cached enum34-1.1.10-py2-none-any.whl (11 kB)
Collecting six>=1.4.1
Using cached six-1.15.0-py2.py3-none-any.whl (10 kB)
Collecting ipaddress; python_version < "3"
Using cached ipaddress-1.0.23-py2.py3-none-any.whl (18 kB)
Collecting cffi>=1.12
Using cached cffi-1.14.4-cp27-cp27m-macosx_10_9_x86_64.whl (175 kB)
Collecting Flask<1.0,>=0.12.2
Using cached Flask-0.12.5-py2.py3-none-any.whl (81 kB)
Collecting Flask-Compress<2.0,>=1.4.0
Using cached Flask-Compress-1.8.0.tar.gz (10 kB)
Collecting Flask-SocketIO<3.0,>=2.9
Using cached Flask_SocketIO-2.9.6-py2.py3-none-any.whl (16 kB)
Collecting gevent<2.0,>=1.2.2
Using cached gevent-1.5.0-cp27-cp27m-macosx_10_9_x86_64.whl (1.7 MB)
Collecting Pygments<3.0,>=2.2.0
Using cached Pygments-2.5.2-py2.py3-none-any.whl (896 kB)
Collecting pycparser
Using cached pycparser-2.20-py2.py3-none-any.whl (112 kB)
Collecting Werkzeug<1.0,>=0.7
Using cached Werkzeug-0.16.1-py2.py3-none-any.whl (327 kB)
Collecting Jinja2>=2.4
Using cached Jinja2-2.11.2-py2.py3-none-any.whl (125 kB)
Collecting itsdangerous>=0.21
Using cached itsdangerous-1.1.0-py2.py3-none-any.whl (16 kB)
Collecting brotli
Using cached Brotli-1.0.9-cp27-cp27m-macosx_10_9_x86_64.whl (417 kB)
Collecting python-socketio>=1.6.1
Using cached python_socketio-5.0.1-py2.py3-none-any.whl (51 kB)
Collecting greenlet>=0.4.14; platform_python_implementation == "CPython"
Using cached greenlet-0.4.17.tar.gz (61 kB)
Collecting MarkupSafe>=0.23
Using cached MarkupSafe-1.1.1-cp27-cp27m-macosx_10_6_intel.whl (17 kB)
ERROR: Could not find a version that satisfies the requirement bidict>=0.21.0 (from python-socketio>=1.6.1->Flask-SocketIO<3.0,>=2.9->gdbgui==0.13.2.0->-r /Users/apple/esp32_official/src/esp-idf/requirements.txt (line 14)) (from versions: 0.1.5, 0.2.1, 0.3.0, 0.3.1, 0.9.0rc0, 0.9.0.post1, 0.10.0, 0.10.0.post1, 0.11.0, 0.12.0.post1, 0.13.0, 0.13.1, 0.14.0, 0.14.1, 0.14.2, 0.15.0.dev0, 0.15.0.dev1, 0.15.0rc1, 0.15.0, 0.16.0, 0.17.0, 0.17.1, 0.17.2, 0.17.3, 0.17.4, 0.17.5, 0.18.0, 0.18.1, 0.18.2, 0.18.3, 0.18.4)
ERROR: No matching distribution found for bidict>=0.21.0 (from python-socketio>=1.6.1->Flask-SocketIO<3.0,>=2.9->gdbgui==0.13.2.0->-r /Users/apple/esp32_official/src/esp-idf/requirements.txt (line 14))
Traceback (most recent call last):
File "/Users/apple/esp32_official/src/esp-idf/tools/idf_tools.py", line 1589, in <module>
main(sys.argv[1:])
File "/Users/apple/esp32_official/src/esp-idf/tools/idf_tools.py", line 1585, in main
action_func(args)
File "/Users/apple/esp32_official/src/esp-idf/tools/idf_tools.py", line 1312, in action_install_python_env
subprocess.check_call(run_args, stdout=sys.stdout, stderr=sys.stderr)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 190, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/Users/apple/.espressif/python_env/idf4.3_py2.7_env/bin/python', '-m', 'pip', 'install', '--no-warn-script-location', '-r', '/Users/apple/esp32_official/src/esp-idf/requirements.txt']' returned non-zero exit status 1
appledeMBP:esp-idf Snow$ /Users/apple/.espressif/python_env/idf4.3_py2.7_env/bin/python
- 先看第一个警告:
Installing Python packages from /Users/apple/esp32_official/src/esp-idf/requirements.txt
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Ignoring None: markers 'sys_platform == "win32"' don't match your environment
该告警大意是提示我们Python2.7将不再维护,我们需要升级本地python环境。
在看第二个错误告警:
Collecting MarkupSafe>=0.23
Using cached MarkupSafe-1.1.1-cp27-cp27m-macosx_10_6_intel.whl (17 kB)
ERROR: Could not find a version that satisfies the requirement bidict>=0.21.0 (from python-socketio>=1.6.1->Flask-SocketIO<3.0,>=2.9->gdbgui==0.13.2.0->-r /Users/apple/esp32_official/src/esp-idf/requirements.txt (line 14)) (from versions: 0.1.5, 0.2.1, 0.3.0, 0.3.1, 0.9.0rc0, 0.9.0.post1, 0.10.0, 0.10.0.post1, 0.11.0, 0.12.0.post1, 0.13.0, 0.13.1, 0.14.0, 0.14.1, 0.14.2, 0.15.0.dev0, 0.15.0.dev1, 0.15.0rc1, 0.15.0, 0.16.0, 0.17.0, 0.17.1, 0.17.2, 0.17.3, 0.17.4, 0.17.5, 0.18.0, 0.18.1, 0.18.2, 0.18.3, 0.18.4)
ERROR: No matching distribution found for bidict>=0.21.0 (from python-socketio>=1.6.1->Flask-SocketIO<3.0,>=2.9->gdbgui==0.13.2.0->-r /Users/apple/esp32_official/src/esp-idf/requirements.txt (line 14))
Traceback (most recent call last):
File "/Users/apple/esp32_official/src/esp-idf/tools/idf_tools.py", line 1589, in <module>
main(sys.argv[1:])
File "/Users/apple/esp32_official/src/esp-idf/tools/idf_tools.py", line 1585, in main
action_func(args)
File "/Users/apple/esp32_official/src/esp-idf/tools/idf_tools.py", line 1312, in action_install_python_env
subprocess.check_call(run_args, stdout=sys.stdout, stderr=sys.stderr)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 190, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/Users/apple/.espressif/python_env/idf4.3_py2.7_env/bin/python', '-m', 'pip', 'install', '--no-warn-script-location', '-r', '/Users/apple/esp32_official/src/esp-idf/requirements.txt']' returned non-zero exit status 1
appledeMBP:esp-idf Snow$ /Users/apple/.espressif/python_env/idf4.3_py2.7_env/bin/python
一开始我以为是某个依赖包必须满足requirement的要求bidict>=0.21.0
结果我手动执行了sudo easy_install bidict
,再次执行了./install.sh
但依旧报相同的错误。
appledeMBP:esp-idf Snow$ sudo easy_install bidict
Password:
Searching for bidict
Best match: bidict 0.21.2
Processing bidict-0.21.2-py2.7.egg
bidict 0.21.2 is already the active version in easy-install.pth
Using /Library/Python/2.7/site-packages/bidict-0.21.2-py2.7.egg
Processing dependencies for bidict
Finished processing dependencies for bidict
appledeMBP:esp-idf Snow$
- 原因分析
仔细查看第一次报错的打印消息,翻到最后一段:
Traceback (most recent call last):
File "/Users/apple/esp32_official/src/esp-idf/tools/idf_tools.py", line 1589, in <module>
main(sys.argv[1:])
File "/Users/apple/esp32_official/src/esp-idf/tools/idf_tools.py", line 1585, in main
action_func(args)
File "/Users/apple/esp32_official/src/esp-idf/tools/idf_tools.py", line 1312, in action_install_python_env
subprocess.check_call(run_args, stdout=sys.stdout, stderr=sys.stderr)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 190, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/Users/apple/.espressif/python_env/idf4.3_py2.7_env/bin/python', '-m', 'pip', 'install', '--no-warn-script-location', '-r', '/Users/apple/esp32_official/src/esp-idf/requirements.txt']' returned non-zero exit status 1
appledeMBP:esp-idf Snow$ /Users/apple/.espressif/python_env/idf4.3_py2.7_env/bin/python
问题的关键在于最后一句:
subprocess.CalledProcessError: Comman '['/Users/apple/.espressif/python_env/idf4.3_py2.7_env/bin/python'
原来是因为esp32默认用的是python2.7版本的环境!!!!
在通过python --version
查看以下系统当前的python版本:
appledeMBP:esp-idf Snow$ python --version
Python 2.7.0
appledeMBP:esp-idf Snow$
可执行下述指令安装python3,brew install python3
具体可参考该链接。
在将python3软链接到本地默认python,
ln -s /usr/local/bin/python3.8 /usr/local/bin/python
(备注:具体python版本参考自己实际安装的)
再通过指令python --version
参考本地python环境是否已更新:
appledeMBP:esp-idf Snow$ python --version
Python 3.8.4
appledeMBP:esp-idf Snow$
- 将MacOS python环境更新到python3以上后,在esp-idf目录再次执行./install.sh 即可正常安装相关依赖包。
appledeMBP:esp-idf Snow$ ./install.sh
Installing ESP-IDF tools
Installing tools: xtensa-esp32-elf, xtensa-esp32s2-elf, xtensa-esp32s3-elf, esp32ulp-elf, esp32s2ulp-elf, openocd-esp32
Skipping xtensa-esp32-elf@esp-2020r3-8.4.0 (already installed)
Skipping xtensa-esp32s2-elf@esp-2020r3-8.4.0 (already installed)
Skipping xtensa-esp32s3-elf@esp-2020r3-8.4.0 (already installed)
Skipping esp32ulp-elf@2.28.51-esp-20191205 (already installed)
Skipping esp32s2ulp-elf@2.28.51-esp-20191205 (already installed)
Skipping openocd-esp32@v0.10.0-esp32-20200709 (already installed)
Installing Python environment and packages
Creating a new Python environment in /Users/apple/.espressif/python\_env/idf4.3\_py3.8_env
Installing virtualenv
Collecting virtualenv
Downloading virtualenv-20.2.2-py2.py3-none-any.whl (5.7 MB)
|████████████████████████████████| 5.7 MB 22 kB/s
Requirement already satisfied: six<2,>=1.9.0 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from virtualenv) (1.15.0)
Collecting appdirs<2,>=1.4.3
Using cached appdirs-1.4.4-py2.py3-none-any.whl (9.6 kB)
Collecting distlib<1,>=0.3.1
Using cached distlib-0.3.1-py2.py3-none-any.whl (335 kB)
Collecting filelock<4,>=3.0.0
Downloading filelock-3.0.12-py3-none-any.whl (7.6 kB)
Installing collected packages: filelock, distlib, appdirs, virtualenv
WARNING: The script virtualenv is installed in '/Users/apple/Library/Python/3.8/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed appdirs-1.4.4 distlib-0.3.1 filelock-3.0.12 virtualenv-20.2.2
created virtual environment CPython3.8.4.final.0-64 in 605ms
creator CPython3Posix(dest=/Users/apple/.espressif/python\_env/idf4.3\_py3.8\_env, clear=False, no\_vcs_ignore=False, global=False)
seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app\_data\_dir=/Users/apple/Library/Application Support/virtualenv)
added seed packages: pip==20.3.1, setuptools==51.0.0, wheel==0.36.1
activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
Installing Python packages from /Users/apple/esp32_official/src/esp-idf/requirements.txt
Ignoring None: markers 'sys_platform == "win32"' don't match your environment
Requirement already satisfied: setuptools>=21 in /Users/apple/.espressif/python\_env/idf4.3\_py3.8\_env/lib/python3.8/site-packages (from -r /Users/apple/esp32\_official/src/esp-idf/requirements.txt (line 4)) (51.0.0)
Collecting bitstring>=3.1.6
Using cached bitstring-3.1.7.tar.gz (195 kB)
Collecting click>=5.0
Using cached click-7.1.2-py2.py3-none-any.whl (82 kB)
Collecting cryptography>=2.1.4
Using cached cryptography-3.3.1-cp36-abi3-macosx\_10\_10\_x86\_64.whl (1.8 MB)
Collecting ecdsa>=0.16.0
Using cached ecdsa-0.16.1-py2.py3-none-any.whl (104 kB)
Collecting future>=0.15.2
Using cached future-0.18.2.tar.gz (829 kB)
Collecting gdbgui==0.13.2.0
Using cached gdbgui-0.13.2.0-py3-none-any.whl (878 kB)
Collecting kconfiglib==13.7.1
Using cached kconfiglib-13.7.1-py2.py3-none-any.whl (145 kB)
Collecting pyelftools>=0.22
Using cached pyelftools-0.27-py2.py3-none-any.whl (151 kB)
Collecting pygdbmi<=0.9.0.2
Using cached pygdbmi-0.9.0.2-py3-none-any.whl (16 kB)
Collecting pyparsing<2.4.0,>=2.0.3
Using cached pyparsing-2.3.1-py2.py3-none-any.whl (61 kB)
Collecting pyserial>=3.0
Using cached pyserial-3.5-py2.py3-none-any.whl (90 kB)
Collecting reedsolo<=1.5.4,>=1.5.3
Using cached reedsolo-1.5.4.tar.gz (271 kB)
Collecting cffi>=1.12
Using cached cffi-1.14.4-cp38-cp38-macosx\_10\_9\_x86\_64.whl (176 kB)
Collecting Flask<1.0,>=0.12.2
Using cached Flask-0.12.5-py2.py3-none-any.whl (81 kB)
Collecting Flask-Compress<2.0,>=1.4.0
Using cached Flask_Compress-1.8.0-py3-none-any.whl (7.2 kB)
Collecting brotli
Using cached Brotli-1.0.9-cp38-cp38-macosx\_10\_9\_x86\_64.whl (421 kB)
Collecting Flask-SocketIO<3.0,>=2.9
Using cached Flask_SocketIO-2.9.6-py2.py3-none-any.whl (16 kB)
Collecting gevent<2.0,>=1.2.2
Using cached gevent-1.5.0-cp38-cp38-macosx\_10\_9\_x86\_64.whl (1.8 MB)
Collecting greenlet>=0.4.14
Using cached greenlet-0.4.17.tar.gz (61 kB)
Collecting itsdangerous>=0.21
Using cached itsdangerous-1.1.0-py2.py3-none-any.whl (16 kB)
Collecting Jinja2>=2.4
Using cached Jinja2-2.11.2-py2.py3-none-any.whl (125 kB)
Collecting MarkupSafe>=0.23
Using cached MarkupSafe-1.1.1-cp38-cp38-macosx\_10\_9\_x86\_64.whl (16 kB)
Collecting pycparser
Using cached pycparser-2.20-py2.py3-none-any.whl (112 kB)
Collecting Pygments<3.0,>=2.2.0
Using cached Pygments-2.7.3-py3-none-any.whl (950 kB)
Collecting python-socketio>=1.6.1
Downloading python_socketio-5.0.2-py2.py3-none-any.whl (51 kB)
|████████████████████████████████| 51 kB 54 kB/s
Collecting bidict>=0.21.0
Using cached bidict-0.21.2-py2.py3-none-any.whl (37 kB)
Collecting python-engineio>=4
Using cached python_engineio-4.0.0-py2.py3-none-any.whl (50 kB)
Collecting six>=1.4.1
Using cached six-1.15.0-py2.py3-none-any.whl (10 kB)
Collecting Werkzeug<1.0,>=0.7
Using cached Werkzeug-0.16.1-py2.py3-none-any.whl (327 kB)
Building wheels for collected packages: bitstring, future, reedsolo, greenlet
Building wheel for bitstring (setup.py) ... done
Created wheel for bitstring: filename=bitstring-3.1.7-py3-none-any.whl size=37948 sha256=dab9a2582abe22ca1b1c57c9ab86c274f8847613439b2cc8eadb574e91cda6f2
Stored in directory: /Users/apple/Library/Caches/pip/wheels/6c/2f/25/52effb6e8c69461de76989c5996e836583fa7bbbc7cd539af1
Building wheel for future (setup.py) ... done
Created wheel for future: filename=future-0.18.2-py3-none-any.whl size=491058 sha256=0de5515ab7ec3fa240ef2f1ffc4ddd26ee370e682a29959751bb56bc18236a96
Stored in directory: /Users/apple/Library/Caches/pip/wheels/8e/70/28/3d6ccd6e315f65f245da085482a2e1c7d14b90b30f239e2cf4
Building wheel for reedsolo (setup.py) ... done
Created wheel for reedsolo: filename=reedsolo-1.5.4-py3-none-any.whl size=28951 sha256=d10221a4d9aba55b8469a5d7cb7c43ef62677b7f8031c03fe63d2e11a8dc7bf9
Stored in directory: /Users/apple/Library/Caches/pip/wheels/09/d5/d4/7485a909ef156de1ad5d336eecbd784dd9d54af373850ff4bc
Building wheel for greenlet (setup.py) ... done
Created wheel for greenlet: filename=greenlet-0.4.17-cp38-cp38-macosx\_10\_9\_x86\_64.whl size=17642 sha256=b0cb8363988faa4003d04cef88dc6950bba4e5309ea5e0860925b9d130d84b3a
Stored in directory: /Users/apple/Library/Caches/pip/wheels/8b/b2/a0/90e194b9006a050b5f342dccea2082b753410a8c3d509c2843
Successfully built bitstring future reedsolo greenlet
Installing collected packages: MarkupSafe, Werkzeug, python-engineio, Jinja2, itsdangerous, click, bidict, python-socketio, pycparser, greenlet, Flask, brotli, six, Pygments, pygdbmi, gevent, Flask-SocketIO, Flask-Compress, cffi, reedsolo, pyserial, pyparsing, pyelftools, kconfiglib, gdbgui, future, ecdsa, cryptography, bitstring
Successfully installed Flask-0.12.5 Flask-Compress-1.8.0 Flask-SocketIO-2.9.6 Jinja2-2.11.2 MarkupSafe-1.1.1 Pygments-2.7.3 Werkzeug-0.16.1 bidict-0.21.2 bitstring-3.1.7 brotli-1.0.9 cffi-1.14.4 click-7.1.2 cryptography-3.3.1 ecdsa-0.16.1 future-0.18.2 gdbgui-0.13.2.0 gevent-1.5.0 greenlet-0.4.17 itsdangerous-1.1.0 kconfiglib-13.7.1 pycparser-2.20 pyelftools-0.27 pygdbmi-0.9.0.2 pyparsing-2.3.1 pyserial-3.5 python-engineio-4.0.0 python-socketio-5.0.2 reedsolo-1.5.4 six-1.15.0
All done! You can now run:
. ./export.sh
appledeMBP:esp-idf Snow$ printenv
TERM=xterm
SHELL=/bin/bash
TMPDIR=/var/folders/pf/86b8fct16rn7ts77rlg4g1900000gn/T/
SSH_CLIENT=127.0.0.1 61864 22
SSH_TTY=/dev/ttys010
USER=Snow
PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
PWD=/Users/apple/esp32_official/src/esp-idf
LANG=zh_CN.UTF-8
SHLVL=1
HOME=/Users/apple
LOGNAME=Snow
SSH_CONNECTION=127.0.0.1 61864 127.0.0.1 22
_=/usr/bin/printenv
OLDPWD=/Users/apple/esp32_official/src
appledeMBP:esp-idf Snow$
appledeMBP:esp-idf Snow$ . ./export.sh
Setting IDF\_PATH to '/Users/apple/esp32\_official/src/esp-idf'
Adding ESP-IDF tools to PATH...
Using Python interpreter in /Users/apple/.espressif/python\_env/idf4.3\_py3.8_env/bin/python
Checking if Python packages are up to date...
Python requirements from /Users/apple/esp32_official/src/esp-idf/requirements.txt are satisfied.
Added the following directories to PATH:
/Users/apple/esp32\_official/src/esp-idf/components/esptool\_py/esptool
/Users/apple/esp32_official/src/esp-idf/components/espcoredump
/Users/apple/esp32\_official/src/esp-idf/components/partition\_table
/Users/apple/esp32\_official/src/esp-idf/components/app\_update
/Users/apple/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin
/Users/apple/.espressif/tools/xtensa-esp32s2-elf/esp-2020r3-8.4.0/xtensa-esp32s2-elf/bin
/Users/apple/.espressif/tools/xtensa-esp32s3-elf/esp-2020r3-8.4.0/xtensa-esp32s3-elf/bin
/Users/apple/.espressif/tools/esp32ulp-elf/2.28.51-esp-20191205/esp32ulp-elf-binutils/bin
/Users/apple/.espressif/tools/esp32s2ulp-elf/2.28.51-esp-20191205/esp32s2ulp-elf-binutils/bin
/Users/apple/.espressif/tools/openocd-esp32/v0.10.0-esp32-20200709/openocd-esp32/bin
/Users/apple/.espressif/python\_env/idf4.3\_py3.8_env/bin
/Users/apple/esp32_official/src/esp-idf/tools
Done! You can now compile ESP-IDF projects.
Go to the project directory and run:
idf.py build
appledeMBP:esp-idf Snow$
后续操作可参考乐鑫官网。
参考资料:
ESP-IDF编程指南:
https://docs.espressif.com/projects/esp-idf/zh_CN/latest/esp32/get-started/index.html#get-started-get-esp-idf
MacOs安装Python3:
https://blog.csdn.net/lqmiku/article/details/107304477