CircuitBlocks "Compile error" on macOS Big Sur

Hello everyone,

I wanted to start coding Spencer using Circruitblocks on Mac running macOS Big Sur, but everytime I pressed “run”, after a while I got “Compile error. Check your code then try again” message. It was happening even if my blocks were completely empty so there was unlikely anything wrong with the code.

After a bit of digging around with CircuitBlocks dev environment I found it’s related to this issue

I managed to solve this by following these steps

One difference was that the esptool file that’s supposed to be replaced wasn’t at ~/Library/Arduino15/packages/esp32/tools/esptool_py/2.6.1/ but instead ~/Library/Arduino15/packages/cm/tools/esptool_py/2.6.1/, so you might need to look around for it.

After this I ran into “No module named serial” issue. For some reason pip3 install pyserial didn’t help, so I needed to manually download and install pyserial:
Download a release from here
and install it by running python install (might require sudo) in the downloaded and extracted release folder.

Now my code gets compiled and uploaded to Spencer,
hope this helps anyone running into the same problem.

Happy coding!


Hello there @MartinTesar,

thank you so much for sharing on our forum! :slight_smile:

Dora from CM

1 Like


Just checking in to let you know we’ve fixed uploading sketches in the last version of our ESP32 Arduino platform which should have automatically downloaded when you started CircuitBlocks. Let us know if the problem resurfaces :slight_smile: