Asdf commands to add python:
asdf plugin add python
asdf install python latest
asdf local python latest
Installing:
pip install virtualenv
virtualenv venv
Manually activate/deactivate virtualenv:
source venv/bin/activate
deactivate
To auto-activate virtualenv.
echo 'eval "$(direnv hook zsh)"' >> ~/.zshrc
It needs the .envrc in the project directory
echo "export VIRTUAL_ENV=$PWD/venv\nexport PATH=$PWD/venv/bin:\$PATH" > .envrc
direnv allow
Do a which python and which pip to confirm it’s pointing to the right ones, i.e. the ones inside the venv.