简体   繁体   English

如何在Python3上安装Bob?

[英]How to install Bob on Python3?

I have installed all necessary dependencies on CentOS and Python levels and have thougt I'm near the finish but this is what I have got at the end. 我已经在CentOS和Python级别上安装了所有必需的依赖项,并且我快要完成了,但这就是我最后得到的。 And now I have no idea how to make it work. 现在我不知道如何使它工作。

Installed /tmp/easy_install-3f76uq1w/bob.blitz-2.0.13/.eggs/bob.extension-2.4.5-py3.4.egg
In file included from /usr/include/python3.4m/pyatomic.h:8:0,
                 from /usr/include/python3.4m/Python.h:53,
                 from /tmp/easy_install-3f76uq1w/bob.blitz-2.0.13/bob/blitz/include/bob.blitz/capi.h:24,
                 from /tmp/easy_install-3f76uq1w/bob.blitz-2.0.13/bob/blitz/include/bob.blitz/cppapi.h:12,
                 from bob/blitz/api.cpp:9:
/usr/include/python3.4m/dynamic_annotations.h:472:3: error: template with C linkage
   template <class T>
   ^
Traceback (most recent call last):
  File "/usr/lib64/python3.4/distutils/unixccompiler.py", line 126, in _compile
    extra_postargs)
  File "/usr/lib64/python3.4/distutils/ccompiler.py", line 909, in spawn
    spawn(cmd, dry_run=self.dry_run)
  File "/usr/lib64/python3.4/distutils/spawn.py", line 36, in spawn
    _spawn_posix(cmd, search_path, dry_run=dry_run)
  File "/usr/lib64/python3.4/distutils/spawn.py", line 162, in _spawn_posix
    % (cmd, exit_status))
distutils.errors.DistutilsExecError: command 'gcc' failed with exit status 1

It seems this error somewhere inside Python or its libs. 看来此错误在Python或其库中的某处。 And unfortunately I'm not so familiar with C, Linux and Python to fix it by myself. 不幸的是,我对C,Linux和Python不太熟悉,无法自行修复。 Also I haven't found any workaround in google. 我也没有在谷歌找到任何解决方法。

Does workaround for this really exist? 是否真的存在解决方法?

I know about Anaconda and using Bob via its environment. 我了解Anaconda并通过其环境使用Bob。 But I need to cythonize my python app for calling it from C. And I'm not sure that it will work fine. 但是我需要对从C调用它的python应用程序进行cythonize处理。而且我不确定它是否可以正常工作。

This might be too late to answer. 这可能为时已晚。

The version of gcc you are using might be old and does not support new C++ features. 您使用的gcc版本可能较旧,并且不支持新的C ++功能。

Also about your concern on not using conda, you can use cython with a conda installation as well. 另外,如果您担心不使用conda,也可以将cython与conda安装一起使用。

Please take a look at https://www.idiap.ch/software/bob/install for the latest instructions on how to install Bob. 请查看https://www.idiap.ch/software/bob/install以获得有关如何安装Bob的最新说明。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM