I have Python2.7 and Python 3.7 installed side by side. When I create a venv in a Python3.7 project, it "sees" the global packages of Python2.7 i.e: I'm running a flask project without installing anything (even flask) and it works, because all the required packages are present in the 2.7 installation.
When I run python -v
in the venv I get 3.7, but when I run flask --version
I get:
Flask 0.12.2
Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:25:58) [MSC v.1500 64 bit (AMD64)]
EDIT: I've found that I have c:\Python27
in my PATH, if I remove it all works as expected. But other things break for me. Is there a way to remove Python27 from the path only when activating the virtual env?
EDIT: This is my pyvenv.cfg
:
home = c:\Python37
include-system-site-packages = false
version = 3.7.2
How do I completely separate the venv from the rest of my local environment?
Thanks