PySerial and EspTools Directory Error

I ran into this issue on Big Sur as well. It looks like the upload tool doesn't currently work out-of-the-box. Specifically, upload.py uses esptool which uses pyserial which is not fully functional on Big Sur.

The workaround is to edit ~/Library/Arduino15/packages/esp8266/hardware/esp8266/2.7.4/tools/esptool/esptool.py and comment out a block of code by adding # to the start of each line:

#try:
#    import serial.tools.list_ports as list_ports
#except ImportError:
#    print("The installed version (%s) of pyserial appears to be too old for esptool.py (Python interpreter %s). "
#          "Check the README for installation instructions." % (sys.VERSION, sys.executable))
#    raise

Anyway, hope this helps someone else who searches for this issue and arrives at this thread.

2 Likes