Python Virtual Environment
·61 words·1 min
Themes Guide - This article is part of a series.
Part : This Article
Overview #
Python Virtual Environment is a foundation concept. Here are some typical commands
# creates a virtual environment
python -m venv env
# activates a virtual environment on Mac
. ./env/bin/activate
# activates a virtual environment on Windows
./env/Scripts/activate
# install packages into the virtual environment already activated
python -m pip install <pkg name>
# deactivate a virtual environment
deactivate
Themes Guide - This article is part of a series.
Part : This Article