๐ป Week 04 - Software installations in preparation for class
2023/24 Autumn Term
๐ Learning Objectives
In this weekโs class, we will be exploring Zotero and Quarto Markdown. For that to be possible, youโll need some software installed:
- Anaconda (this allows the install of Python (version 3.11) and associated libraries)
- Quarto
- Zotero
- VSCode (the is the IDE that will allow us to edit Quarto files)
To allow enough time for hands-on practice, we ask that you install the software prior to coming to class (we can, of course, provide help in class for any unexpected install bugs!).
โ๏ธ Setup
Step 1: Checking your operating system (OS) details
Before doing any install, take note of your operating system (i.e whether you are on Windows, Mac, Linux and which version/flavour you are running e.g Windows 10, Windows 11, Mac Ventura 13.6, Ubuntu 23.10 Mantic Minotaur, Debian version 12.2 bookworm).
To find out this information, follow these instructions:
On Windows
This tutorial explains the many different ways you can try to find detailed information about your operating system.
On Mac
For Mac, head this way. In Macโs case, also take note of the chip information (which version of software you should download, e.g for Anaconda, also depends on this piece of information!).
On Linux
If you are running a Linux distribution (e.g Ubuntu, Fedora, Debian, Gentoo), open a terminal and follow either of this or this.
Once youโve taken note of operating system (OS) details, youโre ready to proceed with the installs.
Step 2: Installing Anaconda
In this section, we will be installing the latest version of Anaconda (default version): it comes with (as of the date of writing) Python 3.11.
- Head to the Anaconda download page
- Choose the graphical installer that best corresponds to your own OS and download it by clicking on the link on the page
- Follow the install instructions corresponding to your OS found here โ ๏ธ If installing on Windows, we would suggest the following alterations to the instructions given in the Anaconda documentation:
- If you have admin rights and you are not sharing your computer with anyone, we would recommend that, in step 5, you install Python for All Users instead of JustMe. This is to avoid you having to think about which account you installed Python for and save confusion.
- In step 8, tick the Add Anaconda3 to my PATH environment variable. If you donโt, after the install, the system wonโt recognize python as a valid command and you wonโt be able to use python as a command on the command line terminal.
- Test your installation as shown here. On Mac, just as on Linux, you can open Terminal to do your testing and on Windows, you can try opening the Command Line Prompt or PowerShell (to open the Command Line Prompt, press
Windows+R
, typecmd
and pressEnter
and alternatively, to open PowerShell, pressWindows+R
, typepowershell
and pressEnter
). We would recommend using Terminal for both Mac and Linux and either of Command Line Prompt or PowerShell on Windows and testing the commandsconda list
andpython
. If these commands are not recognized, this means Python and/or Anaconda are not on the PATH and you will need to add them to the PATH: you can follow this tutorial to do so. โ ๏ธ Find out in which folder Anaconda is installed in your system and within that folder, which folders contain the python and conda executables, e.gC:\ProgramData\anaconda3\
for the python executable i.eC:\ProgramData\anaconda3\python.exe
and `C:\ProgramData\anaconda3\Scripts\
for the conda executable i.eC:\ProgramData\anaconda3\Scripts\conda.exe
. It is those folders you should add to your environment variables/PATH. Based on the previous example, you would be addingC:\ProgramData\anaconda3\
andC:\ProgramData\anaconda3\Scripts\
to PATH.
You are now done with installing Anaconda/Python.
Step 2: Installing Quarto
Install the version of Quarto recommended for your OS.
Step 3: Installing VSCode
VS Code (Visual Studio Code) is a source-code editor made by Microsoft for Windows, Linux and macOS. Some of its features include support for debugging, syntax highlighting, intelligent code completion, snippets, code refactoring, and embedded Git. VSCode users can customize the theme, keyboard shortcuts, preferences of the editor to suit their needs as well as install extensions that add functionality to the editor (e.g extensions that add support to programming languages such as Python). We will primarily use VSCode to write Quarto files1 but you can also use it (if you so wish) to test snippets of Python code demonstrated in class.
- Follow these instructions to install VSCode depending on your OS.
- Enable the Python and Jupyter extensions (see here for how). You can add as many extensions as you see fit.
- Take some time to configure your workspace settings and get used to the interface. You can use some of the Jupyter notebooks from previous classes/lectures (e.g the webscrapping script from week 2 or the exploratory data analysis script from the week 3 lecture) to familiarize yourselves with the VSCode editor (and test whether VSCode recognizes the right Python environment!). If you find you canโt execute the code in the notebooks properly (not simply
ModuleNotFoundError
type of errors that are easily fixed by installing the missing libraries byconda install
orpip install
commands in Terminal/Command Line Prompt/PowerShell), you might need to change Python environments within VSCode: see how here and restart VSCode for changes to take effect.
Step 4: Installing Zotero
Zotero is a free, open-source reference management software that allows you to collect, organize, cite, and share your research sources. It lives as an extension in your browser and allows you to save references from online databases, websites, and books. It also has a desktop application that allows you to organize your references into collections and create bibliographies.
- Create a Zotero account
- Install the Zotero extension in your browser and/or install the desktop application following this guide.
โ Youโre now all set for the class sessions on Friday!
Footnotes
In a bit of a meta touch, this guide was written on VSCode as a Quarto (i.e
.qmd
) file! ๐โฉ๏ธ