I have installed opencv module and it is working on idle but when importing it in jupyter notebook then it gives error that module not found.
Opencv module not found
pip install opencv-python
try pip install opencv-contrib-python
i have tried this too
what version are you using of opencv?
can you please send me what output do you receive on executing :
for i in os.sys.path : print(i)
NameError Traceback (most recent call last)
in
----> 1 for i in os.sys.path : print(i)
NameError: name ‘os’ is not defined
Import os first before that.
C:\Users\SHIVANSHU
C:\Users\SHIVANSHU\Anaconda3\python37.zip
C:\Users\SHIVANSHU\Anaconda3\DLLs
C:\Users\SHIVANSHU\Anaconda3\lib
C:\Users\SHIVANSHU\Anaconda3
C:\Users\SHIVANSHU\Anaconda3\lib\site-packages
C:\Users\SHIVANSHU\Anaconda3\lib\site-packages\win32
C:\Users\SHIVANSHU\Anaconda3\lib\site-packages\win32\lib
C:\Users\SHIVANSHU\Anaconda3\lib\site-packages\Pythonwin
C:\Users\SHIVANSHU\Anaconda3\lib\site-packages\IPython\extensions
C:\Users\SHIVANSHU.ipython
First check if this path is correct
C:\Users\SHIVANSHU\Anaconda3\python37\site-packages
If it is correct, then add this in system paths…
Using command…
import sys
sys.path.append(“C:\Users\SHIVANSHU\Anaconda3\python37\site-packages”)
And ensure that beforehand that you have opencv named folder in this path.
there is no such path
Kindly unzip this file
C:\Users\SHIVANSHU\Anaconda3\python37.zip
And confirm does now that path exists or not.
there is no such zip file
there is python37.dll file
What files do you have in this folder C:\Users\SHIVANSHU\Anaconda3
Just check opencv module exists in any of these directories.
it is located here C:\Users\SHIVANSHU\Lib\site-packages
add this pat to system paths using these
after is done try import cv2.
and remember to run this below code in a single cell for now.
import sys
sys.path.append(“C:\Users\SHIVANSHU\Lib\site-packages”)
import cv2