opencv - libprotobuf.so.12 error

TCE Options

TCE Level: 

TCE Open Date: 

Friday, January 10, 2020 - 01:15

opencv - libprotobuf.so.12 error


Hi, I was using `opencv` as usual on devcloud but today I got this error:

 (my_env) uxxxxxx@s001-n121:~$ python
 Python 3.6.3 |Intel Corporation| (default, Feb 12 2018, 06:37:09)
 [GCC 4.8.2 20140120 (Red Hat 4.8.2-15)] on linux
 Type "help", "copyright", "credits" or "license" for more information.
 Intel(R) Distribution for Python is brought to you by Intel Corporation.
 Please check out: https://software.intel.com/en-us/python-distribution
 >>> import cv2
 Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
 ImportError: libprotobuf.so.12: cannot open shared object file: No such file or directory

I started a new env to see if my current env is the problem and followed the steps from this question:

https://forums.intel.com/s/question/0D70P000006VnuOSAS

and got the same result.

Tried:

`pip install opencv-python`

`conda install -c anaconda opencv`

4 posts / 0 new

Hi,

Thanks for reaching out to us.

Kindly follow the below instructions.

Step 1: Open the terminal and activate your environment

source activate my_env

Step 2:  Check the python path by giving the following command

which python

Step 3: If it references /glob python path, update the PATH by exporting the conda python path.

i.e.

export PATH="/home/u*****/.conda/envs/my_env/bin":$PATH

Step 4: Now, check 

which python

It should show the updated python PATH. Now, you can import the opencv package as you did.

Note: Change uxxxx to your user id

Hope it helps.


Worked perfectly! Thanks!


Hi,

Thanks for the confirmation.

We are closing the case. Please raise a new thread if you face any issues.

Leave a Comment

Please sign in to add a comment. Not a member? Join today