Module being imported from another Python install
Question: I'm running multiple installs of Python on Windows Server 2012. I can probably
find a way to work around this, but I'm curious as to what is going on. I'm
wary about radically changing the installs in case I break other people's
Python scheduled tasks that I may not be aware of.

(All the code boxes below are PowerShell).

    
    
    PS C:\> C:\Python34\Scripts\pip.exe list
    jdcal (1.0)
    pip (7.1.2)
    setuptools (12.0.5)
    virtualenv (13.1.2)
    

Although this Python 3.4 install doesn't have Django installed, it appears to
pick up the version from the Python 33x86 install. Is that normal?

    
    
    PS C:\> C:\Python34\python.exe -c "import django; print(django.get_version())"
    1.6.5
    PS C:\> C:\Python33x86\python.exe -c "import django; print(django.get_version())"
    1.6.5
    

I've created a Python virtualenv based on Python 3.4 and installed Django
1.8.4 in it. Doing a "pip list" confirms that it is installed correctly:-

    
    
    PS C:\> D:\PyVirtualEnvs\example_py34\Scripts\activate.bat
    PS C:\> D:\PyVirtualEnvs\example_py34\Scripts\pip.exe list | Select-String "Django "
    Django (1.8.4)
    

However, when I import within that virtualenv, I get Django version 1.6.5:-

    
    
    PS C:\> D:\PyVirtualEnvs\example_py34\Scripts\python.exe -c "import django; print(django.get_version())"
    1.6.5
    

Is this a bug in virtualenv or am I missing something?

EDIT: Could it be related to [this
question](http://stackoverflow.com/questions/25920265/python-module-imported-
from-outside-virtualenv)?

EDIT2: The same thing happens when using
[pyvenv](https://docs.python.org/3/library/venv.html), as suggested by ham-
sandwich.


Answer: The only thing that looks strange to me is that you are running

    
    
    D:\PyVirtualEnvs\example_py34\Scripts\activate.bat
    

in powershell when a there is a activate.ps1. I don't know if there are
compatibility issues with this.

