Python 基础教程

Python 高级教程

Python 相关应用

Python 笔记

Python FAQ

original icon
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.knowledgedict.com/tutorial/python-no-module-geohash-error.html

python 使用 geohash 报错 ModuleNotFoundError: No module named 'geohash' 解决方法

Python 笔记 Python 笔记


python 使用 geohash 时,报错 ModuleNotFoundError: No module named 'geohash',提示我们没有 geohash 模块。

推荐解决方法

如下错误:

Traceback (most recent call last):
  xxx ...
    xxx ...
  File "/xxx/xxx/.../site-packages/Geohash/__init__.py", line 21, in <module>
    from geohash import decode_exactly, decode, encode
ModuleNotFoundError: No module named 'geohash'

其实我们安装的是 Geohash 模块,该模块内部路径导入貌似有 bug,建议安装更快、更精确的 python-geohash 模块。

pip3 install python-geohash