Relative Content

Tag Archive for python-3.xmacospathfastapi

Getting “bash: fastapi: command not found” when trying to start my fastapi server

I used pip3 install fastapi which should install the fastapi-cli which allows me to run the server start command. When I try to run fastapi dev main.py, I get the error “bash: fastapi: command not found”. I tried looking for solutions online and figured that this is a path issue but I cannot figure out how to edit the path and what to add to it. I have tried adding my python to PATH but that didn’t work. Please let me know how to solve this issue. I’m on MacOS also.Image of described problem in terminal