- For Windows
python -m venv --prompt <venv_promt> <venv_directory>
- For Linux
python3 -m venv --prompt <venv_promt> <venv_directory>
- For Windows
<venv_directory>\Scripts\activate.bat
- For Linux
source <venv_directory>/bin/activate
- For Windows
where python
, should return new python path - For Linux
which python3
should return new python path
- For Windows
python -m pip install -r requirements.txt
orpip install <package name>
- For Linux
python3 -m pip install -r requirements.txt
orpip3 install <package name>
- For Windows
python -m pip freeze --local
. - For Linux
python3 -m pip freeze --local
orpython3 -m pip install <package name>
In Windows with command
python -m venv --prompt sfm .venv
venv Prompt =
sfm
venv Directory =
.venv