๐Ÿ—๏ธ Week 05 - Software installations in preparation for Quarto/Zotero tutorial

2024/25 Autumn Term

Author

DS101A 2024/25 Teaching Team

Published

28 October 2024

๐Ÿ“š Learning Objectives

The Quarto/Zotero tutorial will have you exploring Zotero and Quarto Markdown in preparation for your first ๐Ÿ“formative for this course. 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)

โš™๏ธ 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.

  1. Head to the Anaconda download page
  2. Choose the graphical installer that best corresponds to your own OS and download it by clicking on the link on the page
  3. 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.
  1. 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, type cmd and press Enter and alternatively, to open PowerShell, press Windows+R, type powershell and press Enter). We would recommend using Terminal for both Mac and Linux and either of Command Line Prompt or PowerShell on Windows and testing the commands conda list and python. 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.g C:\ProgramData\anaconda3\ for the python executable i.e C:\ProgramData\anaconda3\python.exe and `C:\ProgramData\anaconda3\Scripts\ for the conda executable i.e C:\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 adding C:\ProgramData\anaconda3\ and C:\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.

โš ๏ธ In case you encounter issues with the latest version of Quarto (version 1.6.32 at the time of writing), try uninstalling the latest version of Quarto and installing an older version from this page (tab Older releases) e.g version 1.4.557. Make sure however that you have a version above 1.4 installed: some of the features in the tutorial (e.g inline Python code) wonโ€™t work for earlier versions of Quarto!

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.

  1. Follow these instructions to install VSCode depending on your OS.
  2. Enable the Python and Jupyter extensions (see here for how). You can add as many extensions as you see fit.
  3. 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 (e.g the script from week 2 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 by conda install or pip 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.

  1. Create a Zotero account
  2. Install the Zotero extension in your browser and/or install the desktop application following this guide.

โœ… Youโ€™re now all set for the Quarto/Zotero tutorial

Footnotes

  1. In a bit of a meta touch, this guide was written on VSCode as a Quarto (i.e .qmd) file! ๐Ÿ˜‰โ†ฉ๏ธŽ