[英]Python cannot find module h2o
我在Debian上安裝了Python 2和3(通過apt
),並按照官方說明安裝了H2O(從而在執行安裝命令時使用pip3
而不是pip
)。
之后,Python看起來不錯:
$ python
Python 3.6.1 |Anaconda 4.4.0 (64-bit)| (default, May 11 2017, 13:09:58)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
但是,當我嘗試使用h2o時,它會失敗:
>>> import h2o
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'h2o'
到目前為止,我已經嘗試過的方法-尚未解決問題:
錯誤:
UnsatisfiableError: The following specifications were found to be in conflict:
- h2o-py -> python 2.7* -> openssl 1.0.1*
- python 3.6*
whereis python
輸出
python:
/usr/bin/python3.6m
/usr/bin/python3.5m
/usr/bin/python3.6
/usr/bin/python
/usr/bin/python3.5
/usr/bin/python2.7
/usr/lib/python3.6
/usr/lib/python3.5
/usr/lib/python2.6
/usr/lib/python2.7
/etc/python3.6 /etc/python /etc/python3.5
/etc/python2.7
/usr/local/lib/python3.6
/usr/local/lib/python3.5
/usr/local/lib/python2.7
/usr/include/python3.6m
/usr/include/python3.5m
/usr/include/python2.7
/usr/share/python
/home/mac/Apps/anaconda3/bin/python3.6m
/home/mac/Apps/anaconda3/bin/python3.6m-config
/home/mac/Apps/anaconda3/bin/python3.6
/home/mac/Apps/anaconda3/bin/python
/home/mac/Apps/anaconda3/bin/python3.6-config
/usr/share/man/man1/python.1.gz
如何讓Python查找水? 如果此修復程序包括清除Python2,我很高興,只是害怕削減依賴關系。
這不能完全回答您的問題,但是我在conda中使用了pip,效果很好:
$ source activate yourenv
$ which pip
例如:
$ pip install http://h2o-release.s3.amazonaws.com/h2o/rel-weierstrass/2/Python/h2o-3.14.0.2-py2.py3-none-any.whl
現在啟動python並導入h2o。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.