Installing Python on your computer

(concise version)

Installing Python on your computer (for Mac, Windows or Linux)

You will need two bits of software to run Python on your computer, both of which are free to download and install. First, you need Python itself (which is the programming language) and then you will need an editor to write and run code - we will be using PyCharm Community.

 

We also use Dropbox as our part of our course management system.

This is the concise version of the installation and setup instructions. If you wish to go through a more detailed version please click here.

 

A. Installing Python

 

  1. Download the latest version of Python 3 from here: http://www.python.org/downloads

  2. On Windows:

    1. Untick the option “Install launcher for all users” as we will not need to launch Python directly but through PyCharm (which we will install later).

    2. Tick the option “Add Python 3.6 to PATH. Then click on "Install Now”

 

B. Installing PyCharm Community Edition

 

  1. Download PyCharm Community from here: https://www.jetbrains.com/pycharm/download/.

  2. ​Once you get to the “Welcome to PyCharm” screen, please follow the steps below carefully for setting up PyCharm for the first time.

 

IMPORTANT STEP

Setting up PyCharm for the first time

 

​When you get the Welcome to PyCharm screen (shown below):

  1. Click on the ‘Configure’ button at the bottom and choose Preferences (on a Mac) or Settings (on Windows). 

  2. Click on Project Interpreter in the menu on the left.

  3. Then click on the icon on the top right, next to the Project Interpreter dropdown menu.

  4. Choose 'Add …’.

  5. Click on 'System Interpreter’’ in the menu on the left and make sure that the Python listed is version 3 (On a Mac this may default to Python 2, choose the correct version from the dropdown menu). Then click ‘OK’ on both windows (this may take a few seconds while PyCharm loads the correct version of Python.) 

  6. Choose Create New Project and you're all set.

​​

 

C. Checking that everything works

 

  • Once you have downloaded and installed both Python and PyCharm Community, open PyCharm

  • You are now in a PyCharm project. From the File menu choose New… and choose 'Python file' from the menu that appears [please note: do not select the option that simply says 'File'.] Type in any file name.

  • This should bring up a blank file. If you get this far, everything should be working fine. But as a final check copy and paste the following line in the blank file:

  • print("Hello, World!")

  • and choose 'Run' from the Run menu; a window will appear and you can simply click the name of the file you have just created. A window should appear at the bottom of the screen with the words Hello, World!. If you get this far, all is working well, and you have written your first computer program!

 

Troubleshooting

 

If you have issues with any part of the installation process, please get in touch and we will assist you in making sure all is set for the course. However, below are a some common issues that may occur during installation.

 

—> While working on a file in PyCharm, a yellow warning bar shows up at the top saying “No Python interpreter configured for the project”. Simply click on the blue link right next to it saying “Configure Python Interpreter”, as shown below:

From the window that comes up you will be able to choose the Python installation from the drop-down menu “Python interpreter”. If there is more than one option choose the latest version of Python 3, as shown below:

If the pull-down Interpreter menu is blank. 

  1. Click on Project Interpreter in the menu on the left.

  2. Then click on the cogwheel icon on the top right, next to the Project Interpreter dropdown menu.

  3. Choose 'Add …’.

  4. Click on 'System Interpreter’’ in the menu on the left and make sure that the Python listed is version 3

—> On Windows PCs, PyCharm may fail to start up, giving an error message. There are two likely reasons for this:

a. You have chosen the wrong option between 32-bit and 64-bit Windows when installing PyCharm. The other version should be installed on your computer. Simply look for it in the folder where PyCharm has been installed and launch the other version.

b. If this does not work, please contact us.