ModuleNotFoundError: No module named 'fastai.transforms'


#1

I ran the lesson on my local but got this error.


ModuleNotFoundError Traceback (most recent call last)
in ()
----> 1 from fastai.transforms import *
2 from fastai.conv_learner import *
3 from fastai.model import *
4 from fastai.dataset import *
5 from fastai.sgdr import *

ModuleNotFoundError: No module named ‘fastai.transforms’

I already installed fastai.


(Shubham) #2

I randomly get error when any fastai module is importing torch.as_tensor. No module named torch.as_tensor.
I am using google colab. I don’t understand why.


#3

Is the lesson1.ipynb out-of-date?
I pulled the latest fastai and cannot find fastai.transforms. fastai.conv_learner…
only can import fastai.imports

Why?


#4

The line which imports “fastai.transforms” is trying to import the contents in the directory old/fastai. If you are on Windows, the symbolic link might be broken and you have to manually create a sym link using command prompt.


(Matthew Elgazar) #5

I am having the same issue. I have have both torch and fastai installed. I tried installing with both conda and pip. Issue still remains.