I'm having trouble executing fastapi under WSL. I'm using:
I'm getting an error when I execute the uvicorn
command -
**extra: Any,
I'm stuck on this for a while so any ideas would be strongly appreciated.
I tried updating python interpretor to newer version (3.9) but for some reason I did not succeed - see pls the second attached screenshot.
FastAPI requires python 3.6 and won't work with Python 3.5 as you've found out.
The ubuntu version you're using does not have a new enough Python version by default. You can either install a more recent Python version in Windows, upgrade your Ubuntu version or use the deadsnakes ppa to get access to newer versions of Python on older Ubuntu versions (or the other way around if you need old Python versions on more recent versions of Ubuntu).