1

Having several exe's of Python, I would like to specify the command (py or python) to launch a certain version from the command line.

At the moment, I have different versions of Python (2.7, 3.6, 3.7 Anaconda) installed on my Windows machines (7 at work, 10 at home). Unfortunately, the commands in the cmd-prompt are not the same.

The output of the following cmd commands is as follows:

py -> 3.7.1 of Anaconda (work) and 3.7.0 (home)

python -> 2.7.13 (work) and 3.6.2 (home)

pyton2 -> not recognized (work) and 2.7.15 (home)

How can I order the variables, so the same commands call the same version of python? Researching about the path variable I could not find how to define the command that launches a specific python.exe.

I really appreciate your help or a pointing in the right direction.

Kind regards, Seb

Naveen
  • 1,190
  • 7
  • 20
  • The easiest thing to do would be to use `venv` that is included in the Python kit. For 2.7, look for `virtualenv`. – lit Jan 03 '19 at 21:50

1 Answers1

0

Good Morning, my apologies, yesterday I did not find this thread here:

In CMD "python" starts Python 3.3, "py" starts Python 2.7, how do I change this?

From now on I will go with "py -X.Y" to start the version of Python I want.

Kind regards, Seb