A quick question, do we need to create virtual environment for installing and using FastAPI. We use venv for Django right? So why not in FastAPI?
You can and you should use virtual environments. Usually each project has its own environment.
Some IDEs have automated the process and made it trivial. For example PyCharm asks you during the creation of the project, but you can also do so afterwards.
You also can use virtual environment for fastapi projects. This is described in the documentation https://fastapi.tiangolo.com/contributing/#virtual-environment-with-venv.
Creating a virtual environment is necessary to separate your Python packages and is independent of your project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With