Creating a virtual environment(name of virtual environment, 3rd argument, is "venv"):
- (Into cmd): python -m venv venv
- (Into cmd): venv\Scripts\activate.bat | (Into Bash): cd venv/ , cd Scripts/, . activate
Creating a virtual environment with system packages(packages already on machine)(name of virtual environment, 3rd argument, is "venv"):
- (Into cmd): python -m venv venv --system-site-packages
- (Into cmd): venv\Scripts\activate.bat | (Into Bash): cd venv/ , cd Scripts/, . activate
Exit venv(cmd or bash):
- deactivate
See packages(including system packages):
- pip list
See packages(local to virtual environment):
- pip list --local
Get requirements.txt:
- pip freeze
Install Requirements from requirements.txt:
- pip install -r requirements.txt
Remove virtual environment(name of virtual environment, 1st argument, is "venv"):
- (Into cmd): rmdir venv /s