Unit 4: Install FastAPI
Last updated
Last updated
A virtual environment is created on top of an existing Python installation, known as the virtual environmentβs "baseβ Python, and may optionally be isolated from the packages in the base environment, so only those explicitly installed in the virtual environment are available.
There is a wide range of virtual environment modules in Python:
(Recommended for beginners)
must be installed on your computer before installing virtual environment modules. For macOS, you can take advantage of to install virtual environment modules.
Taking as an example:
To install, execute this command in CMD/Terminal: pip install virtualenvwrapper
To create a new virtual environment: mkvirtualenv env1
To deactivate a virtual environment: deactivate
You can refer to to discover more useful commands in virtualenvwrapper.
For the tutorial, you might want to install FastAPI with all the optional dependencies and features, by executing the below command in a virtual environment: