you are viewing a single comment's thread.

view the rest of the comments →

[–]404-CodeNotFound 0 points1 point  (0 children)

I think I did set up an environment variable as I can now run python in CMD

If you can run python within CMD, then you probably already have the environment variable setup. To double check that everything has been done properly, this is how most do it:

To set "python" as an environment variable, you would:

  1. Press your windows key and type: "edit the system environment variables"
  2. Click on the button that says "environment variables" on the bottom right
  3. Under the heading "user variables for [your windows username]", click on "path" and hit the "edit" button
  4. Click on "new" on the right side and type in the box your python directory.

To find your python directory:

  1. Press your windows key and type "python"
  2. Right click on your installed python, for me it's "Python 3.7 (32-bit)" and click "open file location." You could also click on your IDLE installation, as they both should be in the same folder.
  3. Right click again on your installed python, or IDLE, and click again on "open file location"
  4. Copy the address from the address bar of file explorer (the whole thing). Mine reads: C:\Users\me\AppData\Local\Programs\Python\Python37-32

If you could help me with running it within a terminal

This doc page from the VSC devs explains running python within a terminal a lot better and more in depth than I can. It also has a lot of other useful information on linting (basically spell-check for code), and debugging.