[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
相关推荐
idolao4 小时前
ANSYS 2024安装教程 Windows版:License Manager配置+环境变量+Fluent汉化指南
macos
Digitally7 小时前
4 种方法将 Mac 联系人同步到 iPhone
macos·cocoa·iphone
黄毛火烧雪下7 小时前
在 macOS 里配置环境变量
macos
万粉变现经纪人8 小时前
如何解决 pip install bitsandbytes 报错 仅支持 Linux+glibc(macOS/Windows 失败)问题
linux·运维·windows·python·scrapy·macos·pip
鹤卿1239 小时前
Masonry
macos·ios·cocoa
承渊政道9 小时前
【动态规划算法】(简单多状态dp问题入门与经典题型解析)
数据结构·c++·学习·算法·leetcode·macos·动态规划
神の愛9 小时前
macOS--brewhome安装镜像
macos
阿洛学长9 小时前
OpenClaw零成本部署指南:Windows/Mac/Linux/阿里云搭建+两个免费大模型API配置攻略
linux·windows·macos
Happy_Sharing10 小时前
Mac安装seqkit、gffread包之后,无法使用seqkit、gffread命令
macos