Python Forum
Running Python in Command Prompt
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Running Python in Command Prompt
#3
C:\Users\mdani>python
Python 3.9.0 (tags/v3.9.0:9cf6752, Oct 5 2020, 15:34:40) [MSC v.1927 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> python --version
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'python' is not defined

First it shows that python with version number in the command prompt. But if I type "python --version"
it gives me traceback NameError.

Please help me to install python correctly.
Reply


Messages In This Thread
Running Python in Command Prompt - by Anwar - Nov-15-2020, 03:00 AM
RE: Running Python in Command Prompt - by ssrobins - Nov-15-2020, 06:53 AM
RE: Running Python in Command Prompt - by Anwar - Nov-15-2020, 01:42 PM
RE: Running Python in Command Prompt - by snippsat - Nov-15-2020, 03:15 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  What is the difference between Command Prompt and Sublimes yaoyao22 1 720 Jul-09-2023, 02:56 PM
Last Post: snippsat
  Open windows cmd prompt and run cmds with python Extra 3 1,540 Jul-14-2022, 06:07 AM
Last Post: Gribouillis
  Facing Problem while opening a file through command prompt vlearner 4 2,054 Jan-30-2022, 08:10 AM
Last Post: snippsat
  Noob warning: trying to use pip to install pytest and pep8 in Command Prompt adifrank 4 5,504 Dec-20-2020, 04:23 AM
Last Post: adifrank
  Sound Approach for Running a Shell Command? matt_the_hall 8 3,526 Dec-14-2020, 02:52 PM
Last Post: matt_the_hall
  Error when running mktorrent subprocess command pythonnewbie138 4 3,988 Sep-16-2020, 01:55 AM
Last Post: pythonnewbie138
  starting python from windows command prompt MaartenRo 4 2,940 Sep-04-2020, 12:25 PM
Last Post: MaartenRo
  Running script from Anaconda prompt acollins555 0 2,652 Jun-15-2020, 03:40 AM
Last Post: acollins555
  Will not print in command prompt PandaCode 12 13,451 May-06-2020, 03:48 AM
Last Post: PandaCode
  Script works when executed from command prompt but not when executed in SDP Tippex 0 2,081 Apr-07-2020, 04:26 PM
Last Post: Tippex

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020