No module named 'cv2'

conda install -c conda-forge opencv

Hi try doing this
git clone https://github.com/fastai/fastai.git
cd fastai
conda env create -f environment.yml

you can remove previously installed env like this
conda env remove -y -n fastai

for a reason, opencv is not installed by this command.
Maybe an issue with pip (I am behind a proxy, so the installation part using pip was incomplete)

Hey check the version of fast.ai you are using. I might be very late in this advice. but hope it helps

Maybe late response, but it may help new folks. I have found that cv2 package was pointing to opencv but looks like it was renamed (in python3?) to python-openvc.

So after all the search I have to install these additional packages to make fastai github repo to work on my Mac:

opencv-python
graphviz
sklearn-pandas
isoweek
pandas-summary
tqdm
pyarrow

I just installed them one by one as the import errors showed up.

Pablo.

1 Like