Linux | Mac |
---|---|
Tenv - toggle python virtual environment - is a simple tool to toggle enabling/disabling a python virtual environment.
~$ tenv
(.venv) ~$ pip3 install spacy
Collecting spacy
...
(.venv) ~$ tenv
~$
Tenv is primarily developed and tested on Linux, but basic functionality should work in macOS as well. Current version has been tested on:
- macOS Sonoma 14.5
- Ubuntu 22.04 LTS
Download the source code:
git clone https://github.com/d99kris/tenv && cd tenv
Generate Makefile and build:
mkdir -p build && cd build && cmake .. && make -s
Optionally install in system:
sudo make install
Optionally add alias to simplify usage, by adding the following line in ~/.bashrc (Linux) or ~/.bash_profile (Mac):
alias tenv=". `which tenv`"
General usage syntax:
. `which tenv`
. `which tenv` <path>
. `which tenv` --help
. `which tenv` --version
Options:
<path> optionally specify virtual environment directory name
--help display this help and exit
--version
output version information and exit
Tenv test suite can be run using these commands:
mkdir -p build && cd build && cmake .. && make -s && ctest --output-on-failure
Tenv is distributed under the MIT license. See LICENSE file.
toggle, virtualenv.