pyquickenv is a command-line tool to start Python virtual environments faster and easier.
Installation:
pip install pyquickenv
or
git clone https://github.com/pizzapanther/Python-Quick-Env.git
cd Python-Quick-Env
sudo python setup.py install
Now, define your environments in ~/.pyenv.json:
{
"proj1": {"env": "/home/user/ENVs/project1", "cd": "/home/user/git/project1"},
"proj2": {"env": "/home/user/ENVs/project2", "cd": "/home/user/git/project2"}
}
***Note, the "cd" attribute is optional***
Next, add the following to your .bashrc:
pyenv() { eval $(pyquickenv "$@") }
Usage:
pyenv proj1
The command above executes:
1. source /home/user/ENVs/project1/bin/activate
2. cd /home/user/git/project2
Product's homepage
Requirements:
· Python