Import Error: No module named 'google.protobuf'

Howdy folks! I’m posting here in the hopes of helping someone reduce troubleshooting time in the future.

I am using Uplink to run code that pulls data from a Google BigQuery project. After installing the anvil-uplink package, I kept getting the import error No module named 'google.protobuf'.

A bit of searching prompted me to check the __init.py__ file in the /site-packages/google directory. It seems the anvil-uplink install adds a get_config function – delete this to resolve (file should be empty).

Source

4 Likes