Setup Python 3+ development environment in Virtualenv with the power of direnv so you don't have to worry about activating and deactivating anything at all. Just cd
into and out of your project directories and direnv
will automatically activate / deactivate your Virtualenv
.
- Install
direnv
andVirtualenv
- Create a directory at
~/bin
and movevenv-python
shell script - In your
~.bash_profile
addexport PATH="$HOME/bin:$PATH";
so that the above script can be executed in the shell - In your
~/.bash_profile
addeval "$(direnv hook bash)"
so that direnv can kick-in whenever youcd
into the project directory - You can now setup your direnv by simply typing
venv-python
in the desired directory
- Django Setup - Quickly scaffold your Django project with shell script.