ModuleNotFoundError: No module named 'fastai'

!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

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

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.

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

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’

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

Glad you solved it @blacng.

1 Like

Thank you @prosti.

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.

I’m using Ubuntu 16 with a gaming laptop so I figured I’d try to run the notebooks on my own system rather than AWS.

I’ve installed python 2.6 and 3.7, conda, and followed this tutorial to install jupyter:

https://course.fast.ai/start_aws.html#step-6-access-fastai-materials

I’m able to startup the notebook, and load it up, but if I select any of the import blocks and hit Shift + Enter, I see an error like this:

I’m running this at /home/ali/ml/course-v3

Would appreciate any help - I’m completely stumped here.

Thanks.

Read the fastai docs. Specifically Jupyter Notebook Dependancies: https://docs.fast.ai/install.html#jupyter-notebook-dependencies

I also have similar issue in ubuntu18.04. thanks ViggoTW your approch helped me.
I started new environment and keep installing the package.

HI, thanks, this worked for me!

I’m on MacBook Pro. I tried the above suggestion and I still got

ModuleNotFoundError: No module named ‘fast.tabular.transform’

But the imports before that work fine:

from fast.imports import *
from fast.tabluar import *
from fast.tabular.transform import *

The last line is the one that gives me the error!

Please advise.

Thanks!