python3 安装方法:

pip install geohash

  

安装成功后,仍无法 import geohash, 提示报错:ImportError: No module named ‘geohash’。

网上查询各类方法后,找到一个解决方法:

1. 将Geohash文件名改成 geohash

2. geohash文件夹下的 __init__.py 中的 from geohash import decode_exactly, decode, encode

改成 from .geohash import decode_exactly, decode, encode

geohash前多加一个 ‘.’ 即可。

相关文章:

  • 2021-06-19
  • 2021-06-13
  • 2021-06-21
  • 2022-12-23
  • 2021-09-26
  • 2022-01-12
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-23
  • 2021-09-23
  • 2021-04-28
  • 2021-10-17
相关资源
相似解决方案