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
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 CenterFile Exchange 中查找有关 Call 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