ModuleNotFoundError: No module named 'fastai.structured'

HI,
I have not been able to get past the first lesson for over three days. I keep getting this error, and I have tried and tried my best to solve it . Please I need help so I can progress in the course. I have tried it on my local computer and also on crestle I keep getting the errors
ModuleNotFoundError: No module named ‘fastai.structured’

1 Like

The module’s name has been changed to “tabular”. So use “from fastai.tabular import *” instead.

16 Likes

So glad I came here I have been messing around with this for 3 hours. Thanks Mauro!

1 Like

It works. Thank you, Mauro

Where can I get the proc_df I found out the structured.py file that was there before and I am using that file to get over the issue of importing the functions, but tabular seems like it doesn’t have it anymore. Could someone tell me how can I call the function?

What you can is to copy the python file names structured from the library (download the from the repository on github) and put it in the same working directory then you can call import structured or if you put the whole library in the working directory you can run the code in the notebooks and it will work just fine.

Yeah I found the function after posting the query here, thanks though.

Thank you Mauro ! I have been struggling from 2 days to fix this. Thank you very much !

1 Like


where should i place the structured.py?

Also, could not find pandas_summary, so imported pandas instead.

Well since in the version 2, structured has been changed to tabular. you can import fastai.tabular

from fastai.tabular.all import *

Hi SuryaViswanath, could you please tell me where did you find proc_df function in fastai library

Hi, Navven Kumar, did you solve this problem? I now need fastai.structured import and proc_df function, and met the same problem. :grinning:

Possibly here?

I’m a beginner in Machine Learning, so I referred Jereny Howard’s Introduction to Machine Learning for Coders! taught by Jeremy Howard#1 competitor 2 years running, and founder of fastai.
While using this github repo " fastai1/courses/ml1/lesson1-rf.ipynb at master · fastai/fastai1 · GitHub"
I am getting an error for the libraries used here.
I request to all of the members even Jeremy to help me and become a good guide in my Machine Learning Path.
If Jeremy’s Reading this post, then a great thanks from me for providing such knowledge freely.

Here many functions are not working for ex;
The function train_cats not working, it doesnot convert the strings into Categorical Variable also there was problem with add_datepart in that it wasn’t Identifying the Week part of the date.
I will soon upload the updated soon…I am still working on these Mistakes