Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 360
Paw in Data Avatar asked Jul 12 '20 07:07

Paw in Data


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.

like image 71
Weeble Avatar answered Nov 12 '22 14:11

Weeble