Python在水蟒中找不到水包

2024-06-29 00:39:29 发布

您现在位置:Python中文网/ 问答频道 /正文

当我试图进口水,我被告知,包不存在。当我试图安装它时,它告诉我它已经存在。我试着把它从我的电脑里抹掉,然后重新安装,但没有成功。在这一点上,我能想到的只是一些环境变量。

(C:\Users\Lanier\Anaconda2) C:\Users\Lanier>python
Python 2.7.12 |Anaconda custom (64-bit)| (default, Jun 29 2016, 11:07:13) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
>>> import h2o
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named h2o
>>> quit()

(C:\Users\Lanier\Anaconda2) C:\Users\Lanier>conda install h2o
Fetching package metadata ...........
Solving package specifications: .

# All requested packages already installed.
# packages in environment at C:\Users\Lanier\Anaconda2:
#
h2o                       3.10.0.9                      0

(C:\Users\Lanier\Anaconda2) C:\Users\Lanier>

Tags: indefaultpackagepackagescustom环境变量bitanaconda
3条回答

我在conda install上也遇到了同样的问题,但是一切都很好:

pip install h2o

根据docs的说法,如果仍有人在这个问题上挣扎:

H2O has tabulate>=0.75 as a dependency; however, there is no tabulate available in the default channels for Python 3.6. This is available in the conda-forge channel. As a result, Python 3.6 users must add the conda-forge channel in order to load the latest version of H2O.

因此,您必须遵循以下步骤:
conda config --append channels conda-forge
这将把conda forge频道附加到可用的存储库中。
然后:
conda install -c h2oai h2o
安装所需的软件包。

conda包不是特定于语言的,在本例中conda install h2o安装java包。你需要做conda install h2o-py

不知道为什么没有-py这个功能在我的旧电脑上运行。

相关问题 更多 >