-2

I'm starting out with Python, I have installed the command prompt and IDLE. Version 3.7, 32 bits. I am having trouble setting Python to interactive mode.

I have tried changing the environmental variable, through the following steps:

Going to PC → Advanced System Settings → Environmental variable → new

Then typing:

Variable Name: Python

Variable Value: C:\Python37

Just so you know it is saved in my desktop folder, in python 3.7 folder, and in that is the command prompt and IDLE (type is said to be shortcut)

SO when I go to the command prompt and type python or Python or Python37 or Python3.7, it just shows a name error/not defined error

The thing is I can still use it to print and calculate stuff, but setting it to interactive mode is the challenge. I am very new as you can tell, help would be appreciated!

mkrieger1
  • 19,194
  • 5
  • 54
  • 65
Ani Q
  • 1
  • I am not sure I understand the question. Are you saying that you are able to run python someScript.py from your commandline, but not start python in interactive mode by just typing python? – Metareven Apr 16 '18 at 11:54
  • I'm confused. To my understanding, a command prompt by definition is in "interactive mode". – mkrieger1 Apr 16 '18 at 11:54
  • 1
    "I can still use it to print and calculate stuff" - you can use *what* to print and calculate stuff? – mkrieger1 Apr 16 '18 at 11:57

1 Answers1

0

I suppose you installed python using the downloaded file python-3.7.0b1.exe. If so, you have two different "command prompts":

In your start menu you should find a Python 3.7 folder and inside this folder an entry Python 3.7. If you click on that entry, you get a "command prompt" window named Python 3.7. Now you already are in interactive mode.

If, on the other hand, you have a standard Windows command prompt window, you first have to call

python

inside this window to get the above-mentioned Python window (provided your python executable is on your path).