This repository houses the course materials for the Data Programming in Python module at the University of Lincoln.
In order to set up your personal computer to run the module lectures and workshops' Jupyter Notebooks, you have two options:
- Setup with Docker - this is the same setup you have in the labs PC.
- Native setup - simpler, but may cause conflicts with other packages/softwares already installed.
Docker is a platform which allows developers to create and share containers.
A container is an environment separate from your main operating system, which includes all of the requirements to run a piece of software. You can think of it like a box which you can take anywhere, and when opened, the software inside works exactly the same way, no matter where you are running it.
This helps us technicians to give every module the exact coding environment it needs, without causing any conflicts.
If you would like to learn more about how Docker works in your labs, please feel free to contact us at technician@lincoln.ac.uk.
We strongly recommend using the Docker container for your modules on your personal devices, as it recreates the exact coding environment you use in the labs without installing lots of stuff on your computer which may conflict with the required software for other modules you are studying.
These prerequisites are the same for every Computer Science module using Docker containers, so you should only need to do this once and it will work for the rest of your degree.
-
Download and install Docker Desktop: https://www.docker.com/products/docker-desktop/
-
Download and install VSCode: https://code.visualstudio.com/
-
Install the Remote Development extension for VSCode: https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack
-
Install git: https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
- Clone this repository to your computer by opening a command prompt (a.k.a. terminal) and launching
git clone https://github.com/SoCSTech/CMP9065-Data-Programming-in-Python.git
- Inside the cloned folder, there is a folder entitled CMP9065 Data Programming in Python which contains the .devcontainer folder.
- Make sure Docker Desktop is running. You can minimise the window.
- Open VS Code, go to File -> Open Folder, and select your CMP9065 Data Programming in Python folder.
- Click the Reopen in container pop up in the bottom right corner of your VS Code window. If you do not see this pop up, press F1, and type Reopen in Container, and click on the Dev Containers: Reopen in Container command.
- The Docker image will now be downloaded, and the container will be started. You can click show log in the bottom right corner to see what is going on.
- Your docker container is now running! Within this VS Code window, you can now run workshop or assignment material exactly the same as in the computing labs.
- Every week there will be new materials pushed to this repository. In order to get the most up-to-date version of the materials every time, before starting to work open a command prompt inside the CMP9065-Data-Programming-in-Python folder and enter
git pull
If you are struggling to get this to work, try these common troubleshooting steps:
- Restart your computer. Always a good start.
- Make sure Docker Desktop is open and running.
- Make sure Docker Desktop is updated.
- Make sure VS Code has the Remote Development extension pack. You can install this through the Extensions tab in VS Code if it isn't working through the web link above.
Following these steps you will be downloading all the software packages required for this software on your computer. Some packages may conflict with already existing installations, if that is the case (or you are worried it may be the case), we suggest you setup your PC following the Setup with Docker instructions.
- Ensure you have the latest version of Python installed. It can be obtained from https://www.python.org/downloads/ for all operating sytems.
- Using your Command Prompt/Terminal launch the following command to install Jupyter Notebook
pip install --upgrade pip pip install notebook
- From the command prompt, install all the packages required throughout the module:
pip install scikit-learn scikit-image seaborn matplotlib numpy pandas scipy
- Clone this repository to your computer by opening a command prompt and launching
git clone https://github.com/SoCSTech/CMP9065-Data-Programming-in-Python.git
- Now that Python and Jupyter Notebook are installed use Command Prompt/Terminal (or similar) to run the command:
jupyter notebook
- The previous step should have opened a browser window at http://localhost:8888/, if not go to this address by clicking the link here.
- Select the folder CMP9065-Data-Programming-in-Python/CMP9065 Data Programming in Python which contains the content of the module you have cloned.
- Open the notebook file for the corresponding week you need to work on; for example, Workshop 1 - Module Overview and Introduction to Python.ipynb.
- Every week there will be new materials pushed to this repository. In order to get the most up-to-date version of the materials every time, before starting to work open a command prompt inside the CMP9065-Data-Programming-in-Python folder and enter
git pull