I have installed Anaconda with Python3
. Then, I additionally created a virtual environment with Python2
. There are no other Pythons on the computer. My problem:
If I run the command
python C:\Path\To\myScript.py arg1 arg2
in CMD, Python 3.4 is used to execute myScript.py
(as expected/desired). But! If I create a .bat
file that contains precisely the upper command, Python 2.7 is used. (I check the version with the command print(sys.version)
in myScript.py
).
How can I fix that?