Python virtualenv wrapper fns - virtualenv vs venv
Created by: sinewalker
I'm discovering as I play with Jupyter & matplotlib on a macOS machine, that virtualenv is suboptimal, because it copies Python binaries, which then are no longer macOS Frameworks, and so matplotlib doesn't work when called from inside another application such as a jupyter-enabled virtualenv.
Also tools like MS-VS Code seem to advocate the Python standard virtual environment system (since 3.6) of venv.
Also, I've been using "venv" in my bash fns as a short-hand for "virtualenv" (much like pipenv does, apparently) and so that'll be a bit confusing.
I need to rethink how / if my mkvenv
, lsvenv
, rmvenv
fns work with virtualenv and venv; maybe switch them to venv and refactor the virtualenv-aware fns to mkpyv
or something?
See:
- Difference between venv, pyvenv, pyenv, virtualenv, virtualenvwrapper (Stack Overflow)
- Python virtual environments - a primer (realpython.com)
- venv - Creation of virtual environments (Python docs)
- pipenv (github), which uses virtualenv, that may or may not be a problem ?
- Pipenv and virtual environments (Python-Guide.org)