Fastai2 Cannoot import modules "ModuleNotFoundError: No module named 'fastai2.data'"

I installed fastaiv2 from repo, install fastcore from repo.
Ubuntu 18.04. Python 3.7.3

I just came across the same issue, when import fastai2.data in Kaggle environment.

Me too! Did you guys find a solution?

Probably the Jupiter is not using the interpreter that has fastai2.
What solved for me was, after following all the steps of http://dev.fast.ai getting started installing guide
I created a new Jupiter kernel with the fastai2 conda environment, using those commands below

$ source activate fastai2
(fastai2)$ ipython kernel install --name "fastai2-kernel" --user

after that, just

  • refresh the browser which the Jupiter is running
  • Change the kernel to “fastai2-kernel” like this…
    Captura de Tela 2020-08-05 Ă s 11.34.33
    And now your are good to go!
    Captura de Tela 2020-08-05 Ă s 11.34.54

This link is not opening for me. Is it deprecated? :face_with_head_bandage: :sob:

Yes it is, but don’t worry now it’s straightforward to use the lib.
Just open a Google Colab notebook and run these two cells:
!pip install -Uqq fastbook
import fastbook
fastbook.setup_book()

from fastbook import *
from fastai.vision.widgets import *

That’s it!

1 Like

The docs are now at https://docs.fast.ai/, as fastai-v2 has been released, superseding fastai-v1.

Yijin

1 Like