ModuleNotFoundError: No module named 'fastai'

(Andres Aguilar) #41

!ln ... solution is more elegant, but for me the easiest thing was to do was to copy the fastai folder from /courses/dl1 I noticed this was also done on /courses/dl2

0 Likes

(Sagun) #42

I had the same problem as described above. I simply fixed it by deactivating fastai and opening jupyter notebook in base enviornment

0 Likes

(Seun ) #43

I am having the same issue as well in Jupyter notebooks on Azure. I have installed the update to fastai based on the instruction posted on this site.

0 Likes

#44

I am not sure if someone used this in Jupiter. This seams to solve the problem from the title.
! pip install fastai

0 Likes

(Seun ) #45

I installed fastai with pip3 install fastai. Everything seemed to work well. But when I try this line of code: from fastai.vision import *, I still get the same error: ImportError: No module named 'fastai’

0 Likes

(Seun ) #46

My bad. I just had to change the ipython notebook kernel to Python(fastai).

0 Likes

#47

Glad you solved it @blacng.

1 Like

(Seun ) #48

Thank you @prosti.

0 Likes

(Jay A.) #49

Another approach on Windows is to copy the fastai package folder into your Lib\site-packages folder where pip or conda installs libraries.

Assuming you have a virtual environment called ml_env and running Anaconda3 on your PC, you may have to move fastai package to:
*C:\Users<YOUR-PC-NAME>\Anaconda3\envs<ml_env>\Lib\site-packages*

But if you are working from the base environment, which you shouldn’t, your path could look like this: C:\Users<YOUR-PC-NAME>\Anaconda3\Lib\site-packages

I hope that helps any other person just starting out with fastai.

0 Likes