使用模块geopy.distance.geodesic
from geopy.distance import geodesic
lat1=27.994267
lon1=120.699366
lat2=39.4704
lon2=75.989755
print(distance.distance((lat1, lon1), (lat2, lon2)).km) #注意纬度在前精度在后
结果:4286.49071110592
使用模块geopy.distance.geodesic
from geopy.distance import geodesic
lat1=27.994267
lon1=120.699366
lat2=39.4704
lon2=75.989755
print(distance.distance((lat1, lon1), (lat2, lon2)).km) #注意纬度在前精度在后
结果:4286.49071110592