Lesson 1: Not able to run code due to NameError on local Machine


(Anish Joni) #1

I tried to run lesson1 notebook but I am stuck at NameError: name ‘cv2’ is not defined.

I tried importing cv2 package and executed cv.INTER_AREA which triggered the error above and it gives me a value without an error.
image

Not sure, why it won’t work while importing fastai.dataset.

Same error occurs when importing fastai.conv_learner and fastai.transforms.

Has anyone stumbled across something similar? How do I resolve this?


(Martin) #2

If I understand correctly the cv2 package is installed. In that case, try removing it and then re-installing it.

If you are using conda also try to update the packages in the current environment.


(Anish Joni) #3

Thanks for your input. Yes the cv2 package was installed.

I pulled fastai repo to update my local copy and started fresh and the code works now.

Might be caused due to importing packages I did not need.