This is a draft cheat sheet. It is a work in progress and is not finished yet.
Pipenv (Higher level)
Install |
|
Change to directory |
|
Install packages |
|
Running |
pipenv run python main.py
|
|
|
virtualenv (Lower level)
Install |
|
Change to directory |
|
Create folder with py execs & copy of pip |
|
|
(Ignoring name for venv places files in current directory) |
Choose interpreter |
virtualenv -p <Path to interpreter> venv
|
Activate venv |
call venv\Scripts\activate.bat
|
Deactivate |
|
Delete venv |
|
Clean package list |
virtualenv --no-site-packages venv
|
Give access to global site-packages |
virtualenv --system-site-packages venv
|
Create requirement file |
pip freeze > requirements.txt
|
|
|
virtualenvwrapper
Install |
pip install virtualenvwrapper-win
|
Windows default path for WORKON_HOME |
%USERPROFILE%\Envs |
Create virtualenv |
mkvirtualenv project_folder
|
Work on a virenv |
|
Both in one command |
mkproject project_folder
|
Deactivate a venv |
|
Delete a venv |
|
Other commands:
lsvirtualenv
- List all environments
cdvirtualenv
- Navigate to currently activated virenv
|