Conveniently setup & use Python virtual environments.
Use it because:
- you can work with different Python versions per project
- the Python environment is activated as soon as you
cdinto the project dir - the virtual environment is kept tidily in the project dir,
node_modules-style
mkvenv [--force] [--path VENV_PATH] [PYTHON_VERSION]--forcewill (re)build even if the virtual environment already exists--pathto choose a different path for the virtual environmentPYTHON_VERSIONto specify the Python version, else will look in the file.python-version
For example, to create a Python virtual environment in .venv/ of the current dir:
$ mkvenv 3.8.1- macOS
- bash or zsh as your shell
brew install direnvbrew install pyenv
-
Ensure you have these dependencies above
-
Clone this repo
-
Add
source /path/to/mkvenv.shto.profile -
Add
.venvto your global.gitignore