3 ms·
After many years of Django development I've settled on what I find the simplest solution. It includes activation of virtual environments when I cd into a direct
by tmnvix 2y ago
After many years of Django development I've settled on what I find the simplest solution. It includes activation of virtual environments when I cd into a directory.
pyenv for installing and managing python versions.
direnv for managing environments and environment variables (a highly underrated package imo).
With those two installed I just include a .envrc file in every project. It looks like this:
layout python ~/.pyenv/versions/3.11.0/bin/python3
export VARIABLE1=variable1
export VARIABLE2=variable2
etc...
- fragmede 2y agoOh nice. Stick PYTHONPATH="`pwd`/venv/lib/python-3.11/site-packages" or whatever in .envrc and Bob's your uncle.