[英]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.