Virtual Environment for FastAPI

Viewed 74

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?

4 Answers

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.

Yes, you can create a Virtual Environment in FastAPI and maintain your dependencies. Virtual Environments is not Framework dependent. You can use it with any framework.

You should create a virtual environment for each project. You can easily maintain and keep track of your dependencies.

I highly recommend you to use the Anaconda to create and manage the virtual environments

Related