Having various projects in both Python 2 and Python 3 (with both python versions installed), I was looking for a more intuitive way to run scripts via Command Prompt than
py -3 script.py
.
Python 2 already took python script.py
, so ideally python3 script.py
should invoke Python 3.
My question: How can I add python3
as a Command Prompt command?
If Python 2 and 3 are both installed and in the PATH variable, you can do:
py -2
or
py -3
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