简体   繁体   中英

AttributeError: module 'cv2' has no attribute 'ximgproc'

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

在此处输入图像描述

cv2.ximgproc is working when I run it in bash, but doesn't work on Jupyter notebook. 在此处输入图像描述

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM