What is the best way to load in emacs the environment variables of a virtualenv?
I seem to have got virtualenvwrapper.el working. For example, after using
venv-workon my_venv, then
M-! printenv shows that the environment variable
VIRTUAL_ENV has been set to
my_venv. Likewise, different virtualenvs load different python versions.
It also seems that I've got the package exec-path-from-shell.el working. For example, in the terminal outside of any virtualenv the command
MY_ENV_VARIABLE=oy. Now after doing
(exec-path-from-shell "MY_ENV_VARIABLE") inside emacs,
M-! printenv confirms that
MY_ENV_VARIABLE=oy inside emacs as well.
So, I tried doing
venv-workon my_venv and then
exec-path-from-shell MY_VENV_VARIABLE, which has been set in
exec-path-from-shell seems to find the value of
MY_VENV_VARIABLE to be
nil while actually it is