https://github.com/yochem/venvs
Global Python virtual environments (venv)
https://github.com/yochem/venvs
Last synced: 11 months ago
JSON representation
Global Python virtual environments (venv)
- Host: GitHub
- URL: https://github.com/yochem/venvs
- Owner: yochem
- Created: 2022-11-28T14:47:06.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-01-31T11:11:30.000Z (over 3 years ago)
- Last Synced: 2025-02-06T13:23:57.731Z (over 1 year ago)
- Language: Shell
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# venvs - wrapper for Python's venv
This script gathers all venvs in one folder and gives system-wide access to them.
**Warning**: It is kinda hacky. Do not trust it without reading through the
code (it's not that long).
## Installation
Download this repository somewhere on your system. Then put this somewhere in
your .bashrc / config.fish:
```
# for bash:
[ -f "path/to/venvs.bash" ] && source "path/to/venvs.bash"
# for zsh (it's just a link to venvs.bash):
[ -f "path/to/venvs.zsh" ] && source "path/to/venvs.zsh"
# for fish
[ -f "path/to/venvs.fish" ] && source "path/to/venvs.fish"
```
## Venvs locations
The virtual environments are created in $XDG_DATA_HOME/venvs. This usually
means ~/.local/share/venvs.
To place it somewhere else, set $XDG_DATA_HOME to another value. After that,
`mv` the contents to the new directory.
```
Usage:
venvs activate venv in the *global venvs directory*
venvs new create new venv in *global venvs directory*
note: run python3 -m venv --help to see options
venvs activate venv in *current directory*
venvs new ./ create new venv in *current directory*
note: run python3 -m venv --help to see options
venvs [ls | list] list all venvs
venvs [rm | remove] remove a venv
venvs deactivate deactivate current venv
venvs [-h | --help] show this help
```