https://github.com/averms/vewrapper
Manage your Python 3 virtual environments in a convenient way
https://github.com/averms/vewrapper
python python3 venv virtualenv virtualenvwrapper
Last synced: 2 months ago
JSON representation
Manage your Python 3 virtual environments in a convenient way
- Host: GitHub
- URL: https://github.com/averms/vewrapper
- Owner: averms
- License: gpl-3.0
- Created: 2019-01-20T03:36:20.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-04-01T04:29:59.000Z (about 1 year ago)
- Last Synced: 2025-01-26T02:44:28.641Z (4 months ago)
- Topics: python, python3, venv, virtualenv, virtualenvwrapper
- Language: Shell
- Homepage:
- Size: 45.9 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# vewrapper
A set of helper functions written in shell script that allow you to manage your Python 3
virtual environments in a convenient way.## Requirements
- Python ≥ 3.5
- Bash, Zsh (with `bashcompinit`), or Mksh (programmable completion doesn't work). It
uses some advanced features that more minimal shells don't support like `[[` and
[substring expansion].[substring expansion]: https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html#Shell-Parameter-Expansion
## Installation
Since the script simply exposes some global functions into your session, you can install
it however you want — you just need to make sure that the file gets run on every shell
startup. Here are two options:- Copy `vewrapper.bash` anywhere onto your machine, then source it in your
`.bashrc`.Or
- Copy the code in `vewrapper.bash` into your `.bashrc`.
Make sure you use the latest release and **not** master.
## Usage
All virtual environments are stored in `$VENV_HOME` folder. There is no default; you need
to export a `VENV_HOME` variable before sourcing the script. It needs to be an absolute
path (not symlinked), and it **can't end with a slash.** A good example would be:
```
export VENV_HOME="$HOME/.local/venv"
```
The `VENV_rm` variable is the command used to remove virtual environments. You can set
it to `rm -rf`, `gio trash` (default), `ktrash`, or whatever you want.Also, don't put spaces in environment names. It breaks the autocompletion.
### Commands
#### `mkve [env-name]`
Creates a python virtual environment at `$VENV_HOME/[env-name]`.
#### `rmve [env-name]`
Deletes the python virtual environment at `$VENV_HOME/[env-name]`. Press tab to
autocomplete \[env-name\]#### `acve [env-name]`
Activates the environment located at `$VENV_HOME/[env-name]`. Press tab to
autocomplete \[env-name\]#### `upve [env-name]`
Updates the environment located at `$VENV_HOME/[env-name]` to the latest system python.
Press tab to autocomplete \[env-name\].This will not update the packages, so if some are not compatible with newer versions of
Python, you will have to update them with `pip`.#### `lsve`
Provides a list of environment names currently stored in `$VENV_HOME`.
## Authors
- **Aman Verma** - [averms](https://github.com/averms)
- **Christopher Sabater Cordero** - [cs-cordero](https://github.com/cs-cordero)