I have installed virtualenv 1.10 on a Windows 7 machine with Python 2.7 on it.
I have created a virtual env called TESTENV. It is located in C:\
If I run C:\TESTENV\Scripts\activate
and then type python
followed by:
import sys
print sys.prefix
it outputs C:\TESTENV
, as exprected.
But if I run D:\virtualenv_test.py
(which is a script containing the two lines of code I used above) it outputs C:\Python27
.
I tried adding a shebang line to the script but that doesn't work on Windows.
Why is the script not running in the context of the virtual environment?