How to install Python 3.5 on Windows

*You could also install Python 2.7 but we highly encourage you to install the latest version (now 3.5).

The easiest way to install Python 3.5 is through the offical website.

  1. Go to https://www.python.org/downloads/



  2. Run the downloaded file and follow the steps.


  3. After the installation is complete restart your computer to make sure the changes have been applied.

Run Python

Go to programs and look for Python 3.5.

The best way to start is to open the IDLE (Python GUI). This is a command line where you can run simple Python code but nothing is saved to a file.

Saving Python files and how to run them

  1. On the IDLE go to 'File' and click on 'New File' (also Crtl+N).
  2. A new window will open and that is the new Python file. Edit it as you like.
  3. To save it, go to 'File' and click 'Save' or (Crtl+S).
  4. Important: make sure the extension of the file is .py .
  5. To open it, right click the file and 'Open with IDLE'.
  6. To run the file you can either press 'F5' or fo to 'Run > Run Module'. The IDLE GUI will open the the file will run there.

Running Python files from the command prompt

Another way to run python files is through the command prompt.

  1. On the search box type 'cmd' and press 'Enter'. A black windows will pop up called 'Command Prompt'.
  2. In order to run a python file we need to first get to where it is located.

Let's say your Python file is saved in Documents. Type 'dir' to see all the available files and folders in the current directory.

C:\> dir

In order to access any folder, in this case 'Documents', we type 'cd Documents'.

C:> cd Documents

Type again 'dir' and you should see your python file listed.
*If you get lost or don't know in which directory you are, you can go back to C by typing 'C:\' and press Enter.

Let's say the python file you want to run is called 'example.py'. To run the file:

C:\>Documents\py example.py

C:\>Documents\python example.py

Both ways should work fine and the result is the same as above.

If this error shows up: 'python is not recognized as an internal or external command, operanle program or batch file.'

After opening the command prompt, type: setx PATH C:\Python35 (assuming you installed Python 3.5).


This titurial is provided by Tomas Silva Ebensperger