π Getting Ready
2023/24 Winter Term
On this page, you will find information on how to set up your computer for this course, as well as practical advice on Python programming.
Set up your computer
Below you will find links to download and install the software that you will need for this course. If you prefer a more detailed guide, you can follow this guide created by our colleague Michael Wiemers from the LSE Digital Skills Lab.
LSE Digital Skills Labs are also offering in-person workshops at the start of the 2023/24 Winter Term. We STRONGLY recommend you take these workshops if you are brand new to programming in Python or need a refresher.
1. Install the bash
terminal
Coding is like having a conversation with your computerβs hardware, such as the CPU, memory, and hard drive, instructing it on what to do. Programming languages like Python offer a high-level way to communicate with the computer, making it more accessible. However, understanding how to communicate with the computer at a fundamental level is essential. For instance, you should know how to run a Python script or install a new Python package. This is where the terminal comes into play.
You will first encounter the Terminal in the π» Week 01 lab, with the help of your lab teacher. But things might make more sense after the ποΈ Week 01 lecture, where we will explain precisely what it is and how it works. The following instructions will guide you through installing a specific Terminal app called bash
on your computer.
Windows users
π― ACTION POINTS
Download Git for Windows. It is very likely that you will need the 64-bit Git for Windows Setup version.
Git is a central tool in this course but we will only start using it in Week 03. We ask you to install it now because it comes with a terminal called
bash
that you will need for your first lab session in Week 01.Run the installer and follow the instructions. You can accept all the default settings.
Once the installation is complete, open the Git Bash app. You can find it by typing βGit Bashβ in the Windows search bar.
macOS users
π― ACTION POINTS
Open the terminal
Now, to ensure you are using the bash shell, type the following and hit ENTER:
echo $SHELL
You can move to the next step if you see the following message on the terminal screen.
/bin/bash
If, instead, you saw the message below:
/bin/zsh
Then your computer came pre-packed with a different terminal called Z Shell. Read and follow the instructions in this tutorial to change your shell to bash 1.
2. Install Python
Python is a general-purpose programming language that is becoming increasingly popular in the social sciences. It is free and open-source and runs on Windows, Mac OS X, and Linux.
π Link: Download Python from the Python Software Foundation.
3. Install miniconda
Just installing Python is not enough. You also need to install a lot of additional packages to be able to do data analysis in Python. The easiest way to do this is to install miniconda, a free and open-source package manager that allows you to install, run, and update Python packages.
π Link: Download miniconda from the miniconda installation webpage.
Note: if you already have some experience with Python and have installed Anaconda, you can skip this step. Anaconda and miniconda are very similar, but Anaconda comes with a lot of additional packages that you probably donβt need and therefore uses more disk space. That is why we recommend using miniconda instead.
4. Install an IDE
Once you download Python, you can start using it straight away. All you need to do is type python
(or python.exe
if you are on Windows) in your terminal to start the Python interpreter. You can also write your Python scripts in any text editor and run them from the terminal with the python
command. However, it is much more convenient to use an integrated development environment (IDE) that provides a graphical user interface (GUI) to Python.
In this course, we will use Visual Studio Code. Follow the instructions below to install it on your computer.
VS Code
Visual Studio Code (VS Code) is a very popular free and open-source IDE developed by Microsoft. It supports many programming languages, including Python, and comes with a lot of useful features, such as syntax highlighting, code completion, and debugging.
π Link: Download Visual Studio Code from the VS Code website.
π Link: Download the Python Extension for VS Code. Donβt forget to read the examples contained on that page to learn how to use the extension.
VS Code is very flexible.
You can install many extensions to add new features to the IDE. For example, you can install the GitHub Copilot extension to get AI-powered suggestions as you write your code or the Grammarly extension to check your spelling and grammar. You can find a list of the most popular VS Code extensions here.
5. GitHub and GitHub Copilot
GitHub is a developer platform which is used by teams across industries to collaborative on data science projects! It uses Git, a version control software, to keep track of changes to projects, managing tasks, bug tracking, feature requests and many more wonderful things. In DS105W, you will get very familiar with GitHub as we will use it for assignments and group work - which is great as itβs a very commonly used platform by data scientists.
GitHub also an AI-based autocompletion software called GitHub Copilot (like Grammarly for code), which is free for students (otherwise, you have to pay a monthly fee). Yay!
π― ACTION POINTS
You can go ahead and create a GitHub account, but I have a few extra tips on this:
1. People often use GitHub even after their studies. GitHub is commonly used to keep a portfolio of your coding skills. So, because of this, we suggest you register an account with GitHub using your personal e-mail address so you can stay in it in the future.
2. Choosing a good (professional-soundingπ©βπΌ) username is also a good idea
3. Then, go to GitHub Education and sign up for the Student Pack (π§At the top of the page, click on Student -> Student Developer Pack, and follow the instructions from there). GitHub itself is free, but the student pack will give you free access to a set of paid tools - some of which we will use in the course. Here, you will have to provide evidence that you are a student at LSE.
4. It might take a few days/weeks for your application to succeed. You wonβt have free access to GitHub Copilot until then - but itβs all good, because we will only use Copilot after W06!
Now you can start exploring the wonderful world of GitHub public repositories. (Whatβs a repository? Have a read here)
Footnotes
Curious about the different shells on Mac π€ ? Checkout the full article on βLearn Enough Tutorials: Using Z Shell on Macsβ©οΈ