首页 > 解决方案 > 安装后如何在windows上导入h3-py(uber)?

问题描述

我想问一下windows上的h3-py安装

我尝试使用 python 在 Windows 上安装 h3 我运行了命令 pip install h3 并安装了它。

安装后,当我尝试导入它时,我收到此错误:

    from h3 import h3
  File "C:\Users\ASUS\AppData\Local\Programs\Python\Python36\lib\site-packages\h3\h3.py", line 39, in <module>
    libh3 = cdll.LoadLibrary('{}/{}'.format(_dirname, libh3_path))
  File "C:\Users\ASUS\AppData\Local\Programs\Python\Python36\lib\ctypes\__init__.py", line 426, in LoadLibrary
    return self._dlltype(name)
  File "C:\Users\ASUS\AppData\Local\Programs\Python\Python36\lib\ctypes\__init__.py", line 348, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found

标签: data-visualizationuber-apih3

解决方案


我们正在将包装器迁移到 Cython,网址为https://github.com/uber/h3-py/tree/cython

您是否介意尝试使用以下(临时)安装步骤安装此 cython 版本:

pip install scikit-build
pip install git+https://github.com/uber/h3-py.git@cython

编辑:

我们已经3.6.1在 PyPI 和 conda 上发布了预构建的轮子。安装现在应该很简单

pip install h3

推荐阅读