virtual environment python code example
Example 1: virtual environment python
py -m venv env
.\env\Scripts\activate
deactivate
Example 2: virtual environment python
pip install virtualenv
virtualenv pas
.\foldername\Scripts\activate
pip freeze
pip freeze > requirements.txt
pip install -r requirements.txt
virtualenv --system-site-packages-foldername
deactivate
Example 3: virtual environment python
python3 -m venv tutorial-env
Example 4: virtual environment python
py -m venv env
.\env\Scripts\activate
deactivate
Example 5: virtual environment python
py -m venv env
.\env\Scripts\activate
deactivate
Example 6: virtual environment python
python3 -m venv env
source env/bin/activate
deactivate
Example 7: virtual environment python
python3 -m venv env
Example 8: virtual environment python
python3 -m venv /path/to/new/virtual/environment
Example 9: virtual environment python
source env/bin/activate