Import googlemaps ModuleNotFoundError: No module named 'googlemaps'

I keep on getting this error on streamlit when deployed on GitHub but this module works fine on vs code.

" ModuleNotFoundError: No module named ‘googlemaps’ "
How do i fix this ?

Hi @Database_Development,

The module works fine locally on VS code as you likely installed it using your dependency manager. To install Python dependencies on Streamlit Sharing, you can upload a requirements.txt file containing the dependencies to the root of your repo.

For example, if the only external package you’re using is googlemaps, here’s what the requirements.txt file would contain (replacing x.x.x with the version you want installed):


I recommend using pipreqs to generate the requirements file by running:

pipreqs /path/to/appdirectory/

You can then upload the generated file to your repo!

Happy Streamlit’ing! :balloon: