I'm trying to use VScode to run some scripts using python 2.7.13 but it always seems to use python 3. First I set up 2 virtual environments. One for python 2 and one for python 3. this doesn't seem to effect VSCode. It always seems to use python 3. I know its using python 3 because I put the following 2 lines in my code:
aa=10
print aa
but I always get an error message associated with the print statement. I know if I use parenthesis in the print statement all works fine.
I also tried using the "Python: Select Interpreter" from the command palette in VSCode. This doesn't work either.
I am running on a Mac with High Sierra. I have the latest version of VScode, 1.23.
What am doing wrong? How do I get VScode to use python 2.
Python: Select Interpreter
I know there is already an accepted answer but wasn't helpful for me, so i'll add mine:
Otherwise try to follow this article didn't worked for me, but i din't read it carefully and probably did some mistakes
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With