简体   繁体   English

ubuntu 16.04 anaconda python 2.7上的caffe安装

[英]caffe installation on ubuntu 16.04 anaconda python 2.7

I installed caffe using "conda install caffe",but when I type "import caffe" in terminal, the following error occurs: 我使用“ 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

I have tried "sudo apt-get install libprotobuf-dev", but it does not help. 我已经尝试过“ sudo apt-get install libprotobuf-dev”,但这无济于事。

How can I solve this problem? 我怎么解决这个问题?

    conda list libprotobuf
    conda install protobuf=3.2 //depends

version of libprotobuf does not fit, use second command to downgrade libprotobuf的版本不适合,请使用第二个命令降级

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

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