Skip to content
This repository has been archived by the owner on Apr 26, 2022. It is now read-only.

Install issues #31

Closed
brad0taylor opened this issue Aug 2, 2017 · 19 comments
Closed

Install issues #31

brad0taylor opened this issue Aug 2, 2017 · 19 comments

Comments

@brad0taylor
Copy link

brad0taylor commented Aug 2, 2017

Thanks you for providing this awesome recipe. I'm having some issues with using the install and perhaps this is a good place to ask. (if not apologies) I've installed caffe as follows:

  • conda create -n caffe
  • conda install python=3.5
  • conda install -c conda-forge caffe
  • conda install caffe
  • When I open python and run ">>>import caffe * " I get the following error.

ImportError: libprotobuf.so.12: cannot open shared object file: No such file or directory

I see /home/brad/anaconda3/envs/caffe/lib/libprotobuf.so.13 but not .so.12. Unfortunately I dont know to get the .12 version. Can you suggest a fix?

Thanks

@djsutherland
Copy link
Contributor

djsutherland commented Sep 10, 2017

I just got the same error; I suppose that protobuf needs to be pinned (conda-forge/conda-forge.github.io#411).

@brad0taylor, you should be able to work around this in the meantime with conda install protobuf=3.2.

@djsutherland
Copy link
Contributor

Actually, it seems that this recipe is only built for python 2.7 for some reason, so @brad0taylor you're probably using the version of caffe from the default repositories. Same fix applies.

This was referenced Sep 10, 2017
@shamangary
Copy link

shamangary commented Oct 31, 2017

After I have the similar error on python3.5, I reinstall an environment for python2.7. But the error still remain.

Python 2.7.14 | packaged by conda-forge | (default, Oct  5 2017, 14:19:56) 
[GCC 4.8.2 20140120 (Red Hat 4.8.2-15)] 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/shamangary/anaconda2/envs/py2cv3/lib/python2.7/site-packages/caffe/__init__.py", line 1, in <module>
    from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolver
  File "/home/shamangary/anaconda2/envs/py2cv3/lib/python2.7/site-packages/caffe/pycaffe.py", line 13, in <module>
    from ._caffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, \
ImportError: libprotobuf.so.10: cannot open shared object file: No such file or directory
>>> 

And I do

conda install protobuf=3.2

But the error is still there. Plz help?

@djsutherland
Copy link
Contributor

djsutherland commented Oct 31, 2017

@shamangary, I think this should be fixed now if you conda install caffe=1.0.

@salvador-blanco
Copy link

salvador-blanco commented Nov 23, 2017

I'm trying to to be able to run this demo https://github.com/ZheC/Realtime_Multi-Person_Pose_Estimation

I'm running ubuntu 14.04

I have installed Anaconda, and after installing many many many dependencies another one pops. It also requires python caffe

So I installed it with this command:
(I also tried Pip install caffe but if failed)
$ Conda install caffe
But then when I try to run it I get:

$ python
   >>> import caffe
   Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/home/gtkratosman-lap/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/gtkratosman-lap/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)
>>>

@djsutherland
Copy link
Contributor

@salvador-blanco, make sure you're using the conda-forge version and don't have any partial pip-installed dependencies floating around. Easiest way is to make a new environment to test:

conda create -n caffetmp -c conda-forge caffe
source activate caffetmp
python -c 'import caffe'

If that works, it means something is messed up in your other environment, probably from mixing incompatible versions of packages from various sources.

@salvador-blanco
Copy link

conda install caffe=1.0
Did not work for me I still get the same error

@jakirkham
Copy link
Member

Please share your full environment. Also please make sure you have protobuf 3.4 not 3.5.

@salvador-blanco
Copy link

So after doing

conda create -n caffetmp -c conda-forge caffe
source activate caffetmp
python -c 'import caffe'

I was able to use caffe on the caffetmp virtual environment, which means my other environments are messed up.
If I want to install caffe outside the environment how should I do it?
I have cleaned everything, so I can have a fresh start

@salvador-blanco
Copy link

salvador-blanco commented Dec 6, 2017

I tried installing
conda install caffe
but I get the following error:

ERROR conda.core.link:_execute_actions(337): An error occurred while installing package 'defaults::opencv-3.1.0-np112py27_1'.
OSError(13, 'Permission denied')

I have no problem using

$python
>>>import cv2

the opencv version I have is 3.3.1

@jakirkham
Copy link
Member

Sounds like some sort of conda problem. Could you please raise upstream? Also please make sure to give them enough info to work with. Thanks.

@jakirkham
Copy link
Member

Closing as it appears the original issue has been resolved.

@nanodust
Copy link

nanodust commented Dec 6, 2017

indeed, clean caffe install w/ instructions above works.
yet - no luck w/ conda-forge caffe-gpu - same libprotobuf.so.12 error.

@jakirkham
Copy link
Member

That's an unrelated issue, @nanodust.

@hossam-96
Copy link

@salvador-blanco, make sure you're using the conda-forge version and don't have any partial pip-installed dependencies floating around. Easiest way is to make a new environment to test:

conda create -n caffetmp -c conda-forge caffe
source activate caffetmp
python -c 'import caffe'

If that works, it means something is messed up in your other environment, probably from mixing incompatible versions of packages from various sources.

and how can i fix this if there is something messed up in my environment without making new one?

@ghost
Copy link

ghost commented Feb 6, 2018

Looks like I have found the solution.
Check your libprotobuf version:
conda list libprotobuf
if it's 3.4.0, you should downgrade it to 3.2.0
conda install libprotobuf=3.2.0
then try it again and it should be ok.
@brad0taylor

@IngleJaya95
Copy link

from ._caffe import Net, SGDSolver, NesterovSolver, AdaGradSolver,
ImportError: libprotobuf.so.10: cannot open shared object file: No such file or directory

Failing with conda install libprotobuf=3.2.0
conda install caffe=1.0

@getamu
Copy link

getamu commented Mar 22, 2019

conda install caffe=1.0
@dougalsutherland
I am getting Packages NotFoundError: The following packages are not available from current channels:
I have done conda install libprotobuf=3.2.0

@advance512
Copy link

If you're installing caffe via conda and running into this, try:

conda install python=2.7 caffe-gpu protobuf gflags

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants