When trying to upload the blink example sketch to the Feather ESP32 V2, it fails to execute the script 'esptool'. I get the same error when trying to run the 'esptool' unix executable /Users/~user/.arduino-create/esp32/esptool_py/4.2.1/esptool
I've tried reinstalling the Arduino Create agent, updating Python, updating pySerial via PyPl. I've also tried installing esptool from the Espressif website, using other ESP boards, and using the other user account on my computer, but the same error persists.
I've searched the internet with no success. Does anyone have any ideas about how to fix this problem?
Computer: MacBook Pro 15" late 2016
OS: macOS 10.14.6 (Mohave)
Browser: Chrome
Python 3.10.6
Board: Adafruit ESP32 Feather V2
/usr/local/bin/arduino-cli compile --fqbn esp32:esp32:featheresp32:DebugLevel=none,FlashFreq=80,PartitionScheme=default,UploadSpeed=921600 --libraries /home/builder/opt/libraries/latest --build-cache-path /tmp --output-dir /tmp/486945634/build --build-path /tmp/arduino-build-91E7009CA357B8F5B2A1812AB255CA7C /tmp/486945634/Blink
Sketch uses 219005 bytes (16%) of program storage space. Maximum is 1310720 bytes.
Global variables use 16088 bytes (4%) of dynamic memory, leaving 311592 bytes for local variables. Maximum is 327680 bytes.
Upload started
Programming with: Serial
Flashing with command:/Users/brian/.arduino-create/esp32/esptool_py/4.2.1/esptool --chip esp32 --port /dev/cu.wchusbserial54790242231 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size 4MB 0x1000 /var/folders/k2/6w1kq2hn64ndmhc4bp78jvjc0000gn/T/extrafiles676009330/Blink.bootloader.bin 0x8000 /var/folders/k2/6w1kq2hn64ndmhc4bp78jvjc0000gn/T/extrafiles676009330/Blink.partitions.bin 0xe000 /var/folders/k2/6w1kq2hn64ndmhc4bp78jvjc0000gn/T/extrafiles676009330/tools/partitions/boot_app0.bin 0x10000 /var/folders/k2/6w1kq2hn64ndmhc4bp78jvjc0000gn/T/arduino-create-agent365579423/Blink.bin
Traceback (most recent call last):
File "esptool/loader.py", line 48, in <module>
File "PyInstaller/loader/pyimod02_importers.py", line 493, in exec_module
File "serial/tools/list_ports.py", line 31, in <module>
File "PyInstaller/loader/pyimod02_importers.py", line 493, in exec_module
File "serial/tools/list_ports_posix.py", line 33, in <module>
File "PyInstaller/loader/pyimod02_importers.py", line 493, in exec_module
File "serial/tools/list_ports_osx.py", line 26, in <module>
File "PyInstaller/loader/pyimod02_importers.py", line 493, in exec_module
File "ctypes/__init__.py", line 7, in <module>
ImportError: dlopen(/var/folders/k2/6w1kq2hn64ndmhc4bp78jvjc0000gn/T/_MEIq7o6DV/lib-dynload/_ctypes.cpython-38-darwin.so, 2): Symbol not found: _ffi_closure_alloc
Referenced from: /var/folders/k2/6w1kq2hn64ndmhc4bp78jvjc0000gn/T/_MEIq7o6DV/lib-dynload/_ctypes.cpython-38-darwin.so (which was built for Mac OS X 10.15)
Expected in: /usr/lib/libffi.dylib
in /var/folders/k2/6w1kq2hn64ndmhc4bp78jvjc0000gn/T/_MEIq7o6DV/lib-dynload/_ctypes.cpython-38-darwin.so
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "esptool.py", line 31, in <module>
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "PyInstaller/loader/pyimod02_importers.py", line 493, in exec_module
File "esptool/__init__.py", line 42, in <module>
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "PyInstaller/loader/pyimod02_importers.py", line 493, in exec_module
File "esptool/cmds.py", line 14, in <module>
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "PyInstaller/loader/pyimod02_importers.py", line 493, in exec_module
File "esptool/bin_image.py", line 14, in <module>
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "PyInstaller/loader/pyimod02_importers.py", line 493, in exec_module
File "esptool/loader.py", line 53, in <module>
AttributeError: module 'sys' has no attribute 'VERSION'
[1560] Failed to execute script 'esptool' due to unhandled exception!