0

I executed "python --version" on PowerShell and I got:

"python-- : The term 'python--' is not recognized..."

But I'm sure I've already installed Python 3.8.1 (64 bit) and it is listed on the Programs window of the Control Panel. Could someone please help me to understand what this means? I m beginning a course called "Using Python to interact with the operating system". I need to understand this.

rr_silva
  • 54
  • 7

1 Answers1

2

Writing an answer as I can't comment yet. As the comment below your answer mentioned, the command you ran most likely had the dashes right after it. You're meant to run "python --version", not "python-- version". If you run "python" only, does it start the interpreter? (it just shows three ">>>" and waits for your input). If that does not work, try "py". Otherwise you missed a step of the installation, find more solutions here.

Andre
  • 47
  • 7
  • Hi, Andre. Thank you for your answer. With "python": python : The term 'python' is not recognized as the name of a cmdlet... – rr_silva Mar 18 '20 at 14:41
  • But with "py", it started the interpreter! So python is installed, right? Why do I need to write "py" instead of "python"? – rr_silva Mar 18 '20 at 14:43
  • Ok, so if you get the same error with "py", then it probably means the environment variable was not set. I assume you got Python 3.8 from the official website and straight-up installed it, right? Do you know the location where you installed it, so that you can get the path? – Andre Mar 18 '20 at 14:46
  • Ah then, if "py" works, then it's good. Yes, you will have to use "py" instead of "python", wherever needed. For example, "py myScript.py" instead of "python myScript.py" in your terminal/bash. The py version is specific to Windows usually, while python is Linux/Mac, but you can change it if you want. – Andre Mar 18 '20 at 14:49