Why can't I import geopy.distance.vincenty() on Jupyter Notebook? I installed geopy 2.0.0

Viewed 12387
from geopy.distance import vincenty

I just installed the geopy package 2.0.0, I want to use geopy.distance.vincenty() as this doc says. However, it returns ImportError: cannot import name 'vincenty' from 'geopy.distance'. And if I try

from geopy import distance

it becomes AttributeError: module 'geopy.distance' has no attribute 'vincenty'. About two or three months ago I used this on Google Colab, and it was fine. What happened? Could it be the latest version letting go this attribute?

1 Answers

Yes, it has been removed. Look at the changelog's Breaking Changes section which contains this entry:

Removed geopy.distance.vincenty, use geopy.distance.geodesic instead.

Related