Home > Back-end >  AttributeError: module 'cv2' has no attribute 'ximgproc'
AttributeError: module 'cv2' has no attribute 'ximgproc'

Time:04-19

I am having trouble using ximgproc in opencv on Jupyter notebook. I have my venv with the following pip package.

enter image description here

cv2.ximgproc is working when I run it in bash, but doesn't work on Jupyter notebook. enter image description here

CodePudding user response:

Your jupyter kernel is running a different version.

Examine cv2.__version__ and sys.path to diagnose.

I installed cv2 4.5.5 into a project environment from the conda-forge channel of anaconda.org, and it worked great. Take care to make the same environment available when you run jupyter notebook.

  • Related