Issue
I am trying to import OpenCV into my ipynb using Jupyter. I kept getting :
ImportError: No module named 'cv2'
import cv2
import pandas as pd
import numpy as np
import matplotlib
from matplotlib import pyplot as plt
import seaborn as sns
Any idea how to import cv2 in jupyter?
Solution
If you have already installed opencv, then its possible that your notebook and your opencv library are in 2 different python environments. The following has helped me in the past:
- Open your notebook
- In an new cell type:
!pip install opencv-python
Note, that the !
is deliberate. This will install open-cv in your current notebook environment.
Answered By - alif
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.