Intel® DevCloud
Help for those needing help starting or connecting to the Intel® DevCloud
Announcements
Intel Customer Support will be observing the Martin Luther King holiday on Monday, Jan. 17, and will return on Tues. Jan. 18.
For the latest information on Intel’s response to the Log4j/Log4Shell vulnerability, please see Intel-SA-00646
716 Discussions

opencv - libprotobuf.so.12 error

virtualdvid
Innovator
334 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
334 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.

virtualdvid
Innovator
334 Views

Worked perfectly! Thanks!

ChithraJ_Intel
Moderator
334 Views

Hi,

Thanks for the confirmation.

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

Reply