geopy.distance.great_circle无法识别

时间:2015-10-30 20:37:48

标签: python enthought geopy

当我尝试使用from geopy.distance import great_circle 从geopy导入great_circle时,我收到错误消息,告诉我great_circle无法导入。

我正在使用enthought canopy来编写脚本。

我该如何解决这个问题?

我真正需要的是一个用于计算lat-lon坐标对的大圆距离的包。如果您有推荐,请告诉我。

1 个答案:

答案 0 :(得分:1)

The geopy package is not in the Canopy / EPD repository.

Rather, it is in the "Community" (PyPi mirror) repo (marked by the "PyPI" logo in the Package Manager), which contains 11,000 untested ("as is") packages. This repo is not maintained, and we do not test for nor necessarily provide dependencies for these packages. Its main purpose is for the use of some legacy customers. Our apologies for the unclarity and inconvenience.

We usually recommend installing non-Canopy packages using the methods described in this article: "Installing external packages into Canopy Python".

In many cases, all that is required is to uninstall the package in the package manager (if applicable), then to open a Canopy Command Prompt (or Canopy Terminal) from the Canopy Tools menu, and type: pip install <packagename>

This should work fine for geopy, since it is pure Python.