Set project based Unix environment variables

Emacs side of things

package-install RET envrc

In your project

This is what I used for Python based projects. I use pipenv and Pipfiles. Thus, I need to set VIRTUAL_ENV to make everything work.

$ cd ~/src/awesome-app
$ direnv allow

Find where the virtual environemnt actualy resides:

$ pipenv run which python3 | sed 's#/bin/python3$##'
/home/torstein/.local/share/virtualenvs/awesome-app-EpEGAS3U

Add this to an .envrc in your project root:

$ vim .envrc
export VIRTUAL_ENV=/home/torstein/.local/share/virtualenvs/awesome-app-EpEGAS3U
export PATH=${VIRTUAL_ENV}/bin:$PATH

~ /home 🏠 ~ talks 💬 ~ bash ~ craftsmanship ~ db ~ dongxi ~ emacs ~ escenic ~ iam ~ java ~ js ~ language ~ latex ~ ldap ~ life ~ linux ~ llm ~ mac-os-x ~ mt-foo ~ network ~ norsk ~ python ~ quotes ~ running ~ security ~ travel ~ unix ~ various ~ vcs ~ webdesign ~ windows ~ discoveries ~ cv 🧙 ~

Licensed under CC BY Creative Commons License ~ 📡 RSS feed ~ ✉ torstein.k.johansen @ gmail ~ 🐘 @skybert@hachyderm.io ~ 🎥 youtube.com/@skybert