I've never seen an error like this and don't know where to start. I installed opencv with
conda install opencv
and am running Ubuntu Linux 18.04 using a conda environment named fpn. How should I even approach debugging this?
Traceback (most recent call last):
File "test.py", line 5, in <module>
import cv2
ImportError: /home/s/miniconda3/envs/fpn/lib/python3.7/site-packages/../../././libgnutls.so.30: symbol mpn_add_1 version HOGWEED_4 not defined in file libhogweed.so.4 with link time reference
There seems to be a problem with the recent releases of opencv packages for Conda. I have tested all the 4.x releases and found that the problem occurs starting from 4.3. Unless you really depend on >=4.3, forcing a version prior to 4.3 solves the problem,
name: test
channels:
- anaconda
- conda-forge
dependencies:
- python>=3.8
- opencv<4.3
in my cases this installed 4.2.0. Importing cv2
in Python works fine then. Note that using conda update
didn't work for me and I still got the error, but I had to first remove the environment and then re-create it. I think this behavior indicates that the error is rooted in some dependency of opencv, which is not properly down-graded when conda update
is used.
I don't consider this a true solution, but installing via pip with
pip install opencv-python
does work with no problem. Shouldn't there be a way to install with conda?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With