Skip to content
Science, Maths & Technology

Instructions for installing the Learn to Code for Data Analysis free course software

Updated Friday 20th May 2016

Use these instructions to install, run and test the appropriate software for the free course Learn to Code for Data Analysis.

For this course you can use either SageMathCloud or Anaconda. Each has its advantages and disadvantages, but both contain all the data processing software needed for this course: the Python programming language, the data analysis module Pandas, the Jupyter notebook application, and the IPython environment for executing Python code in a Jupyter notebook.

SageMathCloud is a free online service. The advantages are that you don't have to install any software and you can work on the course exercises from anywhere there is an internet connection. The disadvantages are that you need a good internet connection, running the code in your notebook may take time if there are many simultaneous users on SageMathCloud, and you may occasionally lose the latest changes you did to your notebook because the service will periodically reset. However, notebooks are regularly saved automatically and you can also save after each change, so the risk of losing work should be rather small. SageMathCloud offers a paid plan that has better performance and stability than the free plan. The Open University, Futurelearn and the educators have no commercial affiliation with SageMathCloud.

The other option is to install on your laptop or desktop the free Anaconda package. The disadvantages are that you will need about 3GB of disk space, and that you might run into installation problems, especially on older Windows versions. The advantage is that Anaconda runs locally on your machine and therefore doesn't have the limitations of SageMathCloud. We recommend you use Anaconda if you are always going to work on this course from the same computer. If you plan to work on this course from multiple computers, you will need to install Anaconda on each one. You can use cloud storage, like Dropbox, to keep your notebooks in sync across machines.

When you’ve decided whether to use SageMathCloud or Anaconda, please follow the corresponding instructions below. Note that this installation page, SageMathCloud, notebooks and other things may now look slightly different to how they looked when the videos were produced.

SageMathCloud instructions

To use SageMathCloud you need a modern web browser and this notebook to test your installation. To create a SageMathCloud account and test everything is working, follow the instructions on this video:

Anaconda instructions

These instructions cover the download and installation of the freely available Anaconda Python distribution. After completing the Anaconda install please work through the section 'Testing your software installation'.

The installation is different for Windows, Macs and Linux. Please follow the appropriate instructions. In all cases you will be downloading Anaconda3-2.3.0 as this is the specific distribution required for the course (it is approximately 280 MB in size).

We advise you to accept the prefilled defaults suggested during the installation process.

Anaconda Windows instructions

Anaconda will not work on Internet Explorer 8 (IE8). You will need to use another web browser.

  1. Determine if your version of Windows is 32-bit or 64-bit. You can do this by looking at your System panel. Depending on your version of Windows this might be accessible via Start > Control Panel > System, or Start > Control Panel > System and Security > System.
  2. If your PC is 32-bit, download Anaconda for Windows 32-bit.

    If your PC is 64-bit, download Anaconda for Windows 64-bit.

  3. When the download is complete, run the Anaconda .exe file you have just downloaded (for example by double-clicking it). You may get a security warning that the publisher cannot be verified, but this may be ignored. Follow the instructions on screen to install the Anaconda software. We recommend installing to the default location.

  4. If you encounter the following screen leave both boxes ticked UNLESS you are already using Python 3, in which case untick the second box (‘Register Anaconda as my default Python 3.4’).

  5. Start the Anaconda application by clicking on the ‘Launcher’ icon on your desktop. If no icon exists then search for the ‘Launcher’ desktop app from the Start menu (the Anaconda launcher is associated with an icon consisting of a green snake made into a rough ‘A’ shape).
  6. Once you see the Launcher screen with an ‘ipython-notebook’ option, press on its dark blue ‘Launch’ button (do not click on the light blue 'Update' button as this could install a different version of the software). This will open firstly a command prompt and secondly a web browser window (in fact the first time you do this you may be asked which application you wish to use to open the notebook – select an up-to-date browser of your choice). Continue with the instructions below to test your installation.

The following video illustrates all the above steps, including testing the installation, on Windows 8.

Anaconda for Mac instructions

The installation will only work on a 64-bit Mac with OSX 10.7 (Lion) or higher.

  1. Download Anaconda for MacYou may get a security warning that the publisher cannot be verified, but this may be ignored. 
  2. When the download is complete, open the file to initiate the installer and follow the instructions on screen.
  3. For advanced users, if you do not want the installer to modify your bash profile to add Anaconda to your PATH, choose ‘Customise’ at the ‘Installation Type’ phase, expand the Anaconda3 package, and then deselect the ‘Modify PATH’ option.
  4. To launch run the Terminal app and type ‘ipython notebook’. This will open a web browser window (in fact the first time you do this you may be asked which application you wish to use to open the notebook – select an up-to-date browser of your choice). Continue with the instructions below to test your installation.

NOTE: Each time you want to open a notebook you will need to open a Terminal session and type ‘ipython notebook’.

Known issues

  1. You may see a screen ‘You cannot install Anaconda in this location. The Anaconda installer does not allow its software to be installed here.’

    The solution is to click again on the already highlighted option ‘Install for me only’, found next to the house icon. Anaconda will then be installed in your home folder, not in the Applications folder.

Anaconda for Linux instructions

  1. Determine if you are running a 32-bit or 64-bit Linux distribution by opening a Terminal session and typing the command 'arch' or 'uname -m'. If the result is in 'i686' then you have a 32-bit distribution, but if the result is 'x86_64' then you have the 64-bit distribution. Download either the 32-bit or 64-bit version of Anaconda.
  2. Open a Terminal session and navigate to the folder or directory where Anaconda was saved. Run the following command

    ‘bash Anaconda3-2.3.0-Linux-x86.sh’ (if you are running 32-bit)

    ‘bash Anaconda3-2.3.0-Linux-x86_64.sh’ (if you are running 64-bit).

  3. Follow the prompts on the installer screens. You may get a security warning that the publisher cannot be verified, but this may be ignored. 

    You will need to keep pressing the ‘Enter’ key to scroll line by line through the license agreement, until you reach the license approval question. Alternatively you can use the 'space' key to scroll down a page at a time.

    NOTE: You do not need root privileges to install Anaconda if you accept the default or select a user-writable install location such as ~/anaconda.

  4. To launch IPython:

    1. If you chose to add the Anaconda directory to your bash shell PATH environment then:

      Open a Terminal session (if necessary) and type ‘ipython notebook’.

      NOTE: Each time you want to open a notebook you will need to open a Terminal session and type ‘ipython notebook’.

    2. If you chose NOT to add the Anaconda directory to your bash shell PATH environment then:

      Open a Terminal session.

      Add Anaconda to the PATH for the duration of the session by entering ‘source ~/anaconda3/bin/activate ~/anaconda3/’.

      Then type ‘ipython notebook’.

      NOTE: Each time you want to open a notebook you will need to open a Terminal session and enter the above two commands.

  5. Once you have launched IPython, and you see a new web browser window, continue with the instructions below to test your installation.

Testing your Anaconda installation

Before closing Anaconda you should check that it is working correctly. After following the steps above, you should have a web browser window with the Jupyter logo and a list of the folders in your home directory, which is typically C:\users\<your username> on Windows, and /Users/<your username> on a Mac.

  1. Within the web browser window, navigate to a folder of your choice (e.g. ‘Documents’) and create there a new folder for this course, by clicking on ‘New’ and then ‘Folder’ on the right side of the window. The new folder should not be on an external or virtual drive as Jupyter might not be able to find it later.
  2. Click the checkbox next to the new folder, click ‘Rename’ and give the folder an appropriate name, e.g. ‘Learn to Code’. Then click on the new folder name to go into that folder.
  3. Download this test notebook to the newly created folder. Do not attempt to open the file, e.g. by double-clicking it. If the file hasn’t the .ipynb extension, click on the checkbox and the ‘Rename’ button to give it the correct extension.
  4. In the Jupyter web browser window, click on the test notebook to open it and follow the instructions in the notebook.
  5. After closing the notebook, close the Jupyter web browser window and finally close the terminal window.

The following video illustrates the above steps on a Mac.

Known issues

  1. When you open a notebook you might see an error ‘Failed to retrieve MathJax from ‘https://cdn.mathjax.org.mathjax/latest/MathJax.js’’, you should close the notebook, connect to the internet then reopen the notebook.

If you have followed the instructions for your operating system and are still having problems installing Anaconda, you could try asking for help in the public support forum for Anaconda (if you can't access this forum you can try this support forum instead).

 

 

For further information, take a look at our frequently asked questions which may give you the support you need.

Have a question?