Deploying to ESP8266 with Arduino IDE on MacOS error: “pyserial or esptool directories not found next to this upload.py tool”

If you see this error deploying to an ESP8266 from Arduino IDE on MacOS 11.2

"pyserial or esptool directories not found next to this upload.py tool"

… per this post, edit the file:

~/Library/Arduino15/packages/esp8266/hardware/esp8266/2.7.4/tools/pyserial/serial/tools/list_ports_osx.py

Comment out lines 29 and 30 and append these lines:
   iokit = ctypes.cdll.LoadLibrary(‘/System/Library/Frameworks/IOKit.framework/IOKit’)
   cf = ctypes.cdll.LoadLibrary(‘/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation’)

2 Replies to “Deploying to ESP8266 with Arduino IDE on MacOS error: “pyserial or esptool directories not found next to this upload.py tool””

  1. Sorry don’t works for me.
    I do see the iokit.framework and corefoundation.framework but in this directories there are just subdirs Resources and Versions.
    What I don’t understand is, that this error just came up lately. I had problems with ESP32. After a fix I did a complete new installation of Arduino and ESP32 and ESP8266 worked fine. I wonder what happened during this weeks.

  2. … found the problem the Quote mark for strings was wrongly interpreted.
    I fixed that and now its running perfectly again.

    Thank you.

    (Slowly I get totally fed up by Big Sur, so many side effects, it’s really enjoying)

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.