简体   繁体   中英

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:

    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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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