[esp-idf]macos 环境安装 v6.0

安装文档

官方

通过命令行安装

bash 复制代码
/Applications/eim.app/Contents/MacOS/eim install

help 说明

bash 复制代码
/Applications/eim.app/Contents/MacOS/eim --help
All you need to manage your ESP-IDF installations

Usage: eim [OPTIONS] [COMMAND]

Commands:
  install          Install ESP-IDF versions
  list             List installed ESP-IDF versions
  select           Select an ESP-IDF version as active
  discover         Discover available ESP-IDF versions (not implemented yet)
  remove           Remove specific ESP-IDF version
  rename           Rename specific ESP-IDF version
  run              Run command in the context of a specific ESP-IDF version
  import           Import existing ESP-IDF installation using tools_set_config.json
  purge            Purge all ESP-IDF installations
  wizard           Run the ESP-IDF Installer Wizard
  gui              Run the ESP-IDF Installer GUI with arguments passed through command line
  fix              Fix the ESP-IDF installation by reinstalling the tools and dependencies
  install-drivers  Install drivers for ESP-IDF. This is only available on Windows platforms
  completions      Generate shell completion script to stdout
  help             Print this message or the help of the given subcommand(s)

Options:
  -l, --locale <LOCALE>
          Set the language for the wizard (en, cn)

  -v, --verbose...
          Increase verbosity level (can be used multiple times)

      --log-file <LOG_FILE>
          file in which logs will be stored (default: eim.log)

      --do-not-track <DO_NOT_TRACK>
          If set to true, the installer will not send any usage data. Default is false.
          
          [default: false]
          [possible values: true, false]

  -h, --help
          Print help (see a summary with '-h')

  -V, --version
          Print version

help中文说明

复制代码
命令
install
安装 ESP-IDF 版本

list
列出已安装的 ESP-IDF 版本

select
选择某个 ESP-IDF 版本作为当前活动版本

discover
发现可用的 ESP-IDF 版本(尚未实现)

remove
删除指定的 ESP-IDF 版本

rename
重命名指定的 ESP-IDF 版本

run
在指定 ESP-IDF 版本的环境中运行命令

import
使用 tools_set_config.json 导入现有的 ESP-IDF 安装

purge
清除所有 ESP-IDF 安装

wizard
运行 ESP-IDF 安装向导

gui
运行 ESP-IDF 安装图形界面,并将命令行参数传递给图形界面

fix
通过重新安装工具和依赖来修复 ESP-IDF 安装

install-drivers
安装 ESP-IDF 所需驱动,仅在 Windows 平台可用

completions
生成 shell 自动补全脚本并输出到标准输出

help
打印帮助信息,或者打印指定子命令的帮助信息

选项
-l, --locale <LOCALE>
设置向导语言(en、cn)

-v, --verbose...
增加详细日志级别(可多次使用)

--log-file <LOG_FILE>
指定日志保存的文件(默认:eim.log)

--do-not-track <DO_NOT_TRACK>
如果设置为 true,安装器将不会发送任何使用数据。默认值为 false。
可选值:

true
false
-h, --help
打印帮助信息(使用 -h 可查看简要摘要)

-V, --version
打印版本号

命令行参考

复制代码
# 安装指定版本的 ESP-IDF
eim install -i v5.3.2

# 运行交互式向导
eim wizard

# 列出已安装的版本
eim list

使用向导也很好用

bash 复制代码
/Applications/eim.app/Contents/MacOS/eim wizard
2026-04-27 10:21:47 - 10 - 04 - INFO - Running IDF Installer Wizard...
2026-04-27 10:21:47 - 10 - 04 - INFO - All prerequisites are satisfied!
2026-04-27 10:21:47 - 10 - 04 - INFO - Running python sanity check
⢀ Doing something...                                                                                                                         2026-04-27 10:21:48 - 10 - 04 - INFO - Found python3
⢀ Doing something...                                                                                                                           [PASS] Python Version
  [PASS] pip
  [PASS] venv
  [PASS] Standard Library (json, os, platform)
  [PASS] ctypes
  [PASS] SSL/HTTPS
2026-04-27 10:21:51 - 10 - 04 - INFO - Your Python meets the requirements
✔ Please select all of the target platforms (ESP chips) · esp32s3
✔ Please select the desired ESP-IDF version · v6.0
2026-04-27 10:21:58 - 10 - 04 - INFO - Starting mirror latency checks (2 candidates)...
2026-04-27 10:21:59 - 10 - 04 - INFO - Mirror score: https://github.com -> 452
2026-04-27 10:21:59 - 10 - 04 - INFO - Mirror score: https://jihulab.com/esp-mirror -> 641
✔ Select the source from which to download ESP-IDF · https://github.com (452 ms)
2026-04-27 10:22:06 - 10 - 04 - INFO - Starting mirror latency checks (3 candidates)...
2026-04-27 10:22:06 - 10 - 04 - INFO - Mirror score: https://github.com -> 476
2026-04-27 10:22:07 - 10 - 04 - INFO - Mirror score: https://dl.espressif.com/github_assets -> 660
2026-04-27 10:22:07 - 10 - 04 - INFO - Mirror score: https://dl.espressif.cn/github_assets -> 248
✔ Select a source from which to download tools · https://dl.espressif.cn/github_assets (248 ms)
2026-04-27 10:22:21 - 10 - 04 - INFO - Starting mirror latency checks (4 candidates)...
2026-04-27 10:22:22 - 10 - 04 - INFO - Mirror score: https://pypi.org/simple -> 960
2026-04-27 10:22:22 - 10 - 04 - WARN - Mirror ping failed with HEAD for https://mirrors.aliyun.com/pypi/simple
2026-04-27 10:22:23 - 10 - 04 - INFO - Mirror get score: https://pypi.org/simple -> 895
2026-04-27 10:22:23 - 10 - 04 - WARN - Mirror ping failed for https://mirrors.aliyun.com: 403
2026-04-27 10:22:23 - 10 - 04 - INFO - Unable to measure get latency for https://mirrors.aliyun.com/pypi/simple: 3s
2026-04-27 10:22:25 - 10 - 04 - INFO - Mirror get score: https://pypi.tuna.tsinghua.edu.cn/simple -> 1904
2026-04-27 10:22:26 - 10 - 04 - INFO - Mirror get score: https://pypi.mirrors.ustc.edu.cn/simple -> 775
✔ Select a PyPI mirror to download Python packages · https://pypi.mirrors.ustc.edu.cn/simple (775 ms)
✔ Please select the ESP-IDF installation location · /Users/xiesi/.espressif
✔ Select ESP-IDF features to install (Space to toggle, Enter to confirm) · core - Core packages necessary for ESP-IDF, ide - Packages for IDE support in ESP-IDF
2026-04-27 10:25:11 - 10 - 04 - WARN - Failed to read tools configuration: HTTP error: error sending request for url (https://github.com/espressif/esp-idf/raw/v6.0/tools/tools.json). Tool selection will not be available for this version.
2026-04-27 10:25:11 - 10 - 04 - INFO - Cloning ESP-IDF
2026-04-27 10:25:11 - 10 - 04 - ERROR - Download ESP-IDF failed "Refusing to initialize the non-empty directory as '/Users/xiesi/.espressif/v6.0/esp-idf'"

http超时

bash 复制代码
# 测试
python3 -c "import urllib.request; print(urllib.request.urlopen('https://www.baidu.com').status)"

# 安装 certifi
pip install certifi

# 获取证书路径并测试
python3 -c "import certifi; print(certifi.where())"

# 添加到 shell 配置文件(根据你使用的 shell 选择)
# 如果使用 zsh (macOS 默认)
echo 'export SSL_CERT_FILE=$(python3 -c "import certifi; print(certifi.where())" 2>/dev/null)' >> ~/.zshrc
echo 'export REQUESTS_CA_BUNDLE=$SSL_CERT_FILE' >> ~/.zshrc
source ~/.zshrc

# 如果使用 bash
echo 'export SSL_CERT_FILE=$(python3 -c "import certifi; print(certifi.where())" 2>/dev/null)' >> ~/.bash_profile
echo 'export REQUESTS_CA_BUNDLE=$SSL_CERT_FILE' >> ~/.bash_profile
source ~/.bash_profile

还要不要 install.sh

bash 复制代码
# 查看基础环境
cd ~/Espressif/frameworks/esp-idf-v6.0.0
source export.sh
idf.py --version

# 检查工具链
which xtensa-esp32s3-elf-gcc
xtensa-esp32s3-elf-gcc --version

# 检查target
idf.py set-target esp32s3
bash 复制代码
# 直接操作版本
cd ~/你的esp-idf路径
source export.sh
idf.py --version
which idf.py

# 如果这里不行,再执行:
./install.sh esp32s3
source export.sh
idf.py --version
相关推荐
寒水馨16 小时前
macOS下载、安装openclaw-v2026.7.1(附安装包OpenClaw-2026.7.1.dmg)
macos·大模型·github·开源软件·ai助手·openclaw·gpt-5.6
白玉cfc19 小时前
【iOS】MRC和ARC
macos·ios·cocoa
飞雪金灵20 小时前
mac电脑 Maven下载安装和配置环境变量
macos·maven·maven下载安装·mac电脑环境
雨声不在20 小时前
macos 12使用docker
macos·docker·容器
一叶龙洲20 小时前
ubuntu26.04 xfce美化成mac
服务器·ubuntu·macos
李小白杂货铺1 天前
Oh My Zsh 简记
macos·macbook·zsh·主题·插件·oh my zsh·omz
fukai77222 天前
macOS防止休眠的菜单栏小工具
macos
web守墓人2 天前
【go语言】gotar:使用go语言复刻tar命令,并加入7z支持,可独立运行在windows、linux、macos上
linux·macos·golang
之歆3 天前
从 Mac 回到 Windows:用 PowerToys + AutoHotkey 找回熟悉手感
windows·macos
星辰即远方3 天前
字符串合法性检验
macos·ios·cocoa