I think it is an environment setup issue.
Creating a python venv or a conda env and installing fastai should solve this issue.
Oh, the other thing is, if you have installed and configured your environment you probably have not selected the right Python interpreter… In VSCode ctrl + sht + p > Python: select interpreter and choose the interpreter from your venv.
If you are on windows and have Docker installed you could have a look at my post. The DevContainer would setup your environment ready to go.