0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

✅ macOS上でArduino IDEの python 関連ビルドエラーを解決する方法(2025年版)

Last updated at Posted at 2025-05-07

🧩 問題の概要

macOS Monterey以降では /usr/bin/python が削除されており、Arduino IDEや一部ボードパッケージ(例:Seeeduino XIAO nRF52)が python コマンドの存在を前提にしているため、ビルド時に以下のようなエラーが発生:

xcode-select: Failed to locate 'python', requesting installation of command line developer tools.
exit status 72

✅ 解決策(再現性あり・安全)

① Command Line Tools にある python3 を python としてリンクする

sudo ln -s /Library/Developer/CommandLineTools/usr/bin/python3 /Library/Developer/CommandLineTools/usr/bin/python

理由:
Arduino IDE がビルド中に python を直接呼び出す構成になっており、macOS Monterey以降では /usr/bin/python が存在しないため、代わりに Command Line Tools 内の python3 を python として見せかける必要がある。

② adafruit-nrfutil 実行権限エラーの対処

chmod +x ~/Library/Arduino15/packages/Seeeduino/hardware/nrf52/1.1.10/tools/adafruit-nrfutil/macos/adafruit-nrfutil

理由:
ボードパッケージに含まれる adafruit-nrfutil 実行ファイルが、インストール直後は実行権限がついていないため、書き込み工程で permission denied が発生する。

✅ 以上の2つでビルド成功!

この2点の対処だけで、macOS (Apple Silicon対応含む) 上の Arduino IDE でのビルドエラーが解消されます。

📌 備考
• launchctl や shebang の修正などの試行錯誤は不要(今回は機能しなかった)
• 上記シンボリックリンクは安全な Command Line Tools 領域内で完結しているため、SIP無効化などは不要
• Arduino IDE をターミナルから起動する必要もなし(この方法であれば GUI 起動でもOK)

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?