AttributeError: 'ImageList' object has no attribute 'split_by_rand_pct'

I am learning the fastai course-v3 course. When I execute the code in lesson3-planet.ipynb
np.random.seed(42) src = (ImageList.from_csv(path, 'train_v2.csv', folder='train-jpg', suffix='.jpg') .split_by_rand_pct(0.2) .label_from_df(label_delim=' '))
I get the following error:AttributeError: ‘ImageList’ object has no attribute ‘split_by_rand_pct’

The fastai version I installed is 1.0.52

ran your code in kaggle on 1.0.51 and it works for me. what platform are you using?

also, might be worth checking which version the session is using
!pip list | grep fastai

1 Like

Thank you very much, my virtual environment is not configured right! it’s ok now!

1 Like

How have you configured the environment in kaggle?