First, you have the wrong paths. PYTHONPATH tells Python which folders to look for Python modules in, and usually you donβt put the Python installation folder in it. To save the Python installation folder, there is another environment variable called PYTHONHOME . So instead of PYTHONPATH=C:\Python27\ you should have PYTHONHOME=C:\Python27\ . You must modify the PATH variable to use PYTHONHOME accordingly.
How to set environment variables when working with virtualenv; you donβt have to do anything because virtualenv retains its original values ββwhen activated, changes the environment variables that need to be changed, and then restores the original values ββwhen it is deactivated.
You can take a look at Using Python on Windows
source share