conda install h3 在导入时仍然失败

conda install h3 still fails on import

我试过安装 h3 包,似乎成功了:

(torch) C:\alpha\map>conda install -c conda-forge h3
Collecting package metadata (current_repodata.json): done
Solving environment: done


==> WARNING: A newer version of conda exists. <==
  current version: 4.9.1
  latest version: 4.10.1

Please update conda by running

    $ conda update -n base -c defaults conda



## Package Plan ##

  environment location: C:\Users\russe\Anaconda3\envs\torch

  added / updated specs:
    - h3


The following packages will be UPDATED:

  ca-certificates    pkgs/main::ca-certificates-2021.5.25-~ --> conda-forge::ca-certificates-2021.5.30-h5b45459_0

The following packages will be SUPERSEDED by a higher-priority channel:

  certifi            pkgs/main::certifi-2021.5.30-py37haa9~ --> conda-forge::certifi-2021.5.30-py37h03978a9_0
  openssl              pkgs/main::openssl-1.1.1k-h2bbff1b_0 --> conda-forge::openssl-1.1.1k-h8ffe710_0


Proceed ([y]/n)?

Preparing transaction: done
Verifying transaction: done
Executing transaction: done

但尝试导入此包仍然失败:

(torch) C:\alpha\map>python
Python 3.7.5 (default, Oct 31 2019, 15:18:51) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import h3
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'h3'

我在这个 Python/conda 设置中使用了很多其他软件包;只有 h3 给了任何麻烦。也许这只是一些微不足道的必需配置。

我错过了什么?

您只安装了库和二进制文件,即 this. You need to install the python bindings, i.e. this。您可以这样做:

conda install -c conda-forge h3-py