Intel® DevCloud
Help for those needing help starting or connecting to the Intel® DevCloud
1641 Discussions

opencv - libprotobuf.so.12 error

virtualdvid
Innovator
1,141 Views

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`

0 Kudos
3 Replies
ChithraJ_Intel
Moderator
1,141 Views

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.

0 Kudos
virtualdvid
Innovator
1,141 Views

Worked perfectly! Thanks!

0 Kudos
ChithraJ_Intel
Moderator
1,141 Views

Hi,

Thanks for the confirmation.

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

0 Kudos
Reply