VIRTUAL_ENV not unset by deactivate.bat on Windows #9

vbabiy opened this Issue Mar 14, 2011 · 3 comments


None yet
3 participants

vbabiy commented Mar 14, 2011

Hi, deactivate.bat doesn't unset VIRTUAL_ENV environment variable on Windows, using virtualenv 1.5.1. Linux counterpart deactivate instead does.

C:\Sandbox\python>virtualenv foo
New python executable in foo\Scripts\python.exe
Installing setuptools.....................done.

C:\Sandbox\python>cd foo

(foo) C:\Sandbox\python\foo>echo %VIRTUAL_ENV%

(foo) C:\Sandbox\python\foo>Scripts\deactivate.bat
C:\Sandbox\python\foo>echo %VIRTUAL_ENV%

This issue doesn't allow Python Launcher to work with virtualenv -

It seems a fix is to simply unset VIRTUAL_ENV environment variable in deactivate.bat, isn't it?
If so I can make a pull with this change.

@piotr-dobrogost piotr-dobrogost referenced this issue in davidmarble/virtualenvwrapper-win Nov 13, 2012


Make mkvirtualenv WORKON_HOME environment variable aware #21

piotr-dobrogost pushed a commit to piotr-dobrogost/virtualenv that referenced this issue Nov 25, 2012

jezdez added a commit that referenced this issue Feb 17, 2013

Merge pull request #364 from piotr-dobrogost/issue_9
Unset VIRTUAL_ENV environment variable in deactivate.bat. Fixes issue #9.

Ivoz commented Apr 7, 2014

Closed by 25cbf41

@Ivoz Ivoz closed this Apr 7, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment