A simple wrapper around venv
to manage virtual environments in python.
I love virtualenvwrapper
, but I love standards more, and python now has
venv
as its standard virtual environment manager. But python didn't supply a
wrapper, so I'm making this one, inspired by virtualenvwrapper
.
- Download the repo (it's only three files, and one is this README, and another is the LICENSE)
- Put the repo wherever you like.
- In your CLI, navigate to the folder in your command line
- Execute the command below to add the commands to your CLI
echo . $(realpath venvwrapper.sh) >> ~/.bashrc
echo source $(pwd)/venvwrapper.sh >> ~/.zprofile
TODO: This works on OSX Catalina but the script does try to detect whether it has been set up properly, and doesn't detect this properly. Just remove the last few lines of the script, if you confirm it manually.
I personally do my python development in WSL Ubuntu.
mkvenv NAME
(creates a new environment namedNAME
)deactivate
(deactivates the current environment)lsvenv
(lists all of the virtual environments you've already created)activate NAME
(activates the previously-created environment namedNAME
)rmvenv NAME
(removes the previously-created environment namedNAME
)
This software is licensed under the MIT License. See the LICENSE
file.