在ubuntu 16.04 anaconda python 2.7上安装caffe

时间:2018-01-31 10:57:36

标签: python ubuntu caffe pycaffe

我使用“conda install caffe”安装了caffe,但是当我在终端中输入“import caffe”时,会出现以下错误:

    Python 2.7.14 |Anaconda custom (64-bit)| (default, Oct 16 2017, 17:29:19) 
    [GCC 7.2.0] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import caffe
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/home/qing/anaconda2/lib/python2.7/site-packages/caffe/__init__.py", line 1, in <module>
        from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolver, NCCL, Timer
      File "/home/qing/anaconda2/lib/python2.7/site-packages/caffe/pycaffe.py", line 13, in <module>
        from ._caffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, \
    ImportError: libprotobuf.so.12: cannot open shared object file: No such file or directory

我尝试过“sudo apt-get install libprotobuf-dev”,但它没有帮助。

我该如何解决这个问题?

1 个答案:

答案 0 :(得分:0)

Authors

版本的libprotobuf不适合,使用第二个命令降级