Import fastai error while in fastai subdirectory but no error otherwise?

I must be missing something here. I installed pytorch and fastai with conda.

If I’m in D:/Work, run python, import fastai works fine.

If I’m in D:/Work/fastai_v3/course-v3, run python, import fastai gives an error:
Traceback (most recent call last):
_ File “”, line 1, in _
ModuleNotFoundError: No module named ‘fastai’

Same anaconda environment, same session even. Is there any reason why import fastai does not work when I’m in the repo’s folders?

You can try to explicitly activate into the conda environment where you have installed fastai and pytorch by running the "activate " in a command prompt.

Thanks. I finally traced it down to the fact that ipython notebook was not loading my anaconda environment!

For some reason, you need to manually install it for each anaconda environment in order for ipython notebook to work. I found the fix here: