Description
Describe the bug
On newer Ubuntu (Focal Fossa), it is not easy to install the pyserial
module anymore for python2. The repository has pyserial for python3 only. Therefore, this dependency of esptool.py for python2 is missing on most systems.
Desktop (please complete the following information):
- OS: Ubuntu
- Version: Focal Fossa, 20.04
Quick & dirty fix
Actually, esptool.py seems to run with Python3.
Since the upload command may be hard-coded in Arduino IDE, a small change can be made to switch the python interpreter:
-
go to
.arduino15/packages/esp32/tools/
and renameesptool.py
toreal_esptool.py
-
in the same directory, create a file
esptool.py
with the following contents:import subprocess, sys
subprocess.call("python3 ./real_esptool.py " + " ".join(sys.argv[1:]), shell=True) -
run the arduino studio like before; it should be able to upload now