首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何安装幕府的python界面?

如何安装幕府的python界面?
EN

Stack Overflow用户
提问于 2017-08-09 05:19:08
回答 1查看 1K关注 0票数 0

我用的是Mac电脑。步骤1:

sudo conda install -c conda-forge shogun

第2步:

代码语言:javascript
复制
$ python
Python 2.7.12 |Anaconda custom (x86_64)| (default, Jul  2 2016, 17:43:17)
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)] on darwin
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 shogun
>>> from shogun import RealFeatures, PolyKernel, CSVFile
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name RealFeatures

我还使用RPM在Fedora上进行了尝试。在验证C++接口(gcc shogun.cpp -I/usr/include/shogun/base -lshogun -L/usr/lib64/libshogun.*)正常工作后,我按照here和set PYTHONPATH=/usr/lib64/python2.7/site-packages/modshogun.py的说明进行操作

然后:

代码语言:javascript
复制
$ python
Python 2.7.13 (default, May 10 2017, 20:04:36)
[GCC 6.3.1 20161221 (Red Hat 6.3.1-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import shogun
>>> from shogun import RealFeatures, PolyKernel, CSVFile
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name RealFeatures
EN

回答 1

Stack Overflow用户

发布于 2017-08-23 08:34:40

这里的问题可能是,幕府的文档目前是针对正在开发的6.1版本,但conda包是针对最新的实际版本6.0。在6.0中,您需要执行from modshogun import RealFeaturesshogun包是旧的接口,而现代的“模块化”包是modshogun。在即将发布的6.1版本中,它将被重命名为shogun

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/45578184

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档