cannot import name GoogleMaps in python
Use geopy instead, no need for api-key.
From their example:
from geopy.geocoders import Nominatim
geolocator = Nominatim()
location = geolocator.geocode("175 5th Avenue NYC")
print(location.address)
print((location.latitude, location.longitude))
prints:
Flatiron Building, 175, 5th Avenue, Flatiron, New York, NYC, New York, 10010, United States of America
(40.7410861, -73.9896297241625)
I think what you are looking for is the Client
class not GoogleMaps
.
If you want to call it GoogleMaps
import it as follows:
from googlemaps import Client as GoogleMaps