The two functions (akt
and mkvin
) in this gist allow for a quick way to create end activate python's virtual environments
mkvin
will create a new virtual environment in $HOME/virtualenvironments
directory with the name of the directory you're in.
For example:
[mikhail@MadRussian git]$ mkdir projectzero
[mikhail@MadRussian git]$ cd projectzero
[mikhail@MadRussian projectzero]$ mkvin
New python executable in /Users/mikhail/virtualenvironments/projectzero/bin/python
Installing setuptools, pip, wheel...done.
(projectzero)[mikhail@MadRussian projectzero]$
akt
will activate your local virtual environment. Either activating the conventional .venv
directory, or if it is not found then searching for the one created via mkvin