pyvenv
pyvenv copied to clipboard
pyvenv-deactivate remove environment vars not related to virtualenvs
I hit an issue where I was trying to set an environment var and it kept disappearing. I soon realised it was pyvenv-deactivate restoring the old process environment.
pyvenv-activate and pyvenv-deactivate should only replace and restore environment variables which are relevant to the virtualenv (PATH, VIRTUALENV and PYTHONHOME)
Oh an thanks for making this available. I have been using it in my emacs setup for the past 3 years or so. Nice work!
Hello, and thanks for the report (and the kind words! :-)) – you are right, pyvenv
should mimic the behavior of virtualenv, i.e. restore PATH
and PYTHONHOME
only.
so I think pyvenv-deactivate deleted my .emacs config and .emacs.d/ contents. I'm still not sure, but I had set the virtual envs path to a folder I had on my ~/ but when I created a new virtual env pyvenv created a ~ folder, so I deleted the one I created. When I finished doing What I was doing I typed pyvenv-deactivate, it gave an error and puff everything is gone