Why do I receive "python: executable file not found in $PATH" error when configuring an ESP32 board on MATLAB R2022b?

2 ビュー (過去 30 日間)
I am trying to configure my ESP32 DevKitV1 using the "arduinosetup" command, and I am getting the following error:
Failed to program the Arduino board. Click the following link to see the error log. Contact Technical Support if you need more help.
The log file ends with the error:
"python": executable file not found in $PATH
How do I fix this?

採用された回答

MathWorks Support Team
MathWorks Support Team 2023 年 6 月 8 日
This error occurs because some of the code used to configure the ESP boards references "python." Most modern Unix-based OSes (Mac and Linux) only come with python3 and will not recognize the "python" command, resulting in the error above.
You can verify that your system does not recognize the "python" command by running the following on your terminal. This should not display any output.
which python
  • If you are on an Ubuntu distribution, you can use the "python-is-python3" package that automatically creates the links and fixes system references to use python3 whenever it comes across the "python" command. Use the following command to install it.
sudo apt install python-is-python3
  • If you are on a different distribution or using MacOS, you need to find "platform.txt" files under your ESP32 installation directory and change all references to "python" to use "python3" instead.
Finally, you can try installing Python 2.x on your computer, but be aware that Python 2.x is not a supported Python version anymore, and might cause other issues.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCall Python from MATLAB についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by