Attendees should plan on bringing their own laptop to the workshop. There will be numerous hands-on tutorials to help you learn to code and work through models. Attendees should also install Jupyter Notebook and Anaconda on your machine PRIOR TO THE WORKSHOP. Information on how to do so can be found below.
Note that there are many helpful online sites for learning about installations and we recommend you practice googling (or using GPT4) how to install these free tools. Our TF Joseph Colantonio will provide two office hour windows for drop-ins if you continue to face installation issues after trying out alternatives. These will be on Friday, May 12th 11AM-12PM EST and 2PM-3PM EST over zoom. The zoom link can be found in the original email that led you to this site, or by emailing colantoniojoseph@gmail.com .
We will be using Jupyter Notebook (via https://jupyter.org/). It is an open-source, web-based interactive platform that allows users to edit and run code documents via their web browser. Below, please find step-by-step guides for installing Jupyter Notebook using Anaconda (https://www.anaconda.com/download) on both Windows and macOS. The process for both operating systems is largely the same. At no point should you need to purchase/pay for any software.
Windows:
Downloading Anaconda:
Visit the Anaconda website (https://www.anaconda.com/products/individual) and download the Anaconda installer for Windows.
Choose the Python 3.x version that matches your system (32-bit or 64-bit). If you are unsure of which to select, you can just select the 64-bit version.
Run the Anaconda Installer:
Locate the downloaded Anaconda installer file (.exe) and double-click on it.
Follow the prompts in the Anaconda installer wizard. Leave the default settings as they are unless you have a specific requirement.
Choose the option to install Anaconda for "Just Me" (unless you want to install it system-wide).
Choose a directory to install Anaconda. The default location is recommended.
Launch Anaconda Navigator:
After the installation is complete, open the Start menu and find "Anaconda Navigator" in the list of installed programs.
Open/Launch the new program "Anaconda Navigator".
Open Jupyter Notebook:
In the Anaconda Navigator window, click on the "Launch" button below the Jupyter Notebook icon. This will open Jupyter Notebook in your default web browser.
macOS:
Download Anaconda:
Go to the Anaconda website (https://www.anaconda.com/products/individual) and download the Anaconda installer for macOS.
Choose the Python 3.x version that matches your system.
Run the Anaconda Installer:
Locate the downloaded Anaconda installer file (.pkg) and double-click on it.
Follow the prompts in the Anaconda installer wizard. Leave the default settings as they are unless you have a specific requirement.
Launch Anaconda Navigator:
After the installation is complete, open the Launchpad or Applications folder and find "Anaconda Navigator."
Click on "Anaconda Navigator" to launch it.
Open Jupyter Notebook:
In the Anaconda Navigator window, click on the "Launch" button below the Jupyter Notebook icon. This will open Jupyter Notebook in your default web browser.
To ensure that Anaconda keeps Python packages and libraries up to date, you can follow the steps below. By following these steps, you can ensure that both the conda packages and pip packages within your Anaconda environment are kept up to date. It is good practice to periodically update your packages to benefit from bug fixes, new features, and security updates.
Update Anaconda Navigator:
Launch Anaconda Navigator from the Start menu (Windows) or Launchpad (macOS).
In Anaconda Navigator, go to the "Home" tab.
Click on the "Update" button next to the Anaconda Navigator itself. This will ensure you have the latest version of Anaconda Navigator.
Update Anaconda packages:
In Anaconda Navigator, go to the "Environments" tab.
Select the environment for which you want to update the packages. Typically, it's the "base" environment.
Click on the play button (">") next to the environment name to open a drop-down menu.
Choose "Open Terminal" (Windows) or "Open Terminal" (macOS). This will open a command line interface.
Update conda packages:
In the command line interface that you just opened, type (or copy & paste) the following command and press Enter:
conda update --all
This command will update all packages installed in the selected environment, including packages specific to Anaconda navigator.
Update pip packages:
After updating the conda packages, you can update the packages installed via pip.
In the command line interface, type the following command and press Enter:
pip install --upgrade pip
This will update the pip package itself to the latest version.
Then, AS NEEDED, you can update specific packages by replacing ‘pip’ with the name of the package you want to update. For example, to update ‘numpy’ :
pip install --upgrade numpy
To install packages within Jupyter Notebook, you can use the built-in functionality of Jupyter Notebook to execute shell commands. Here's how you can do it:
Launch Jupyter Notebook: Open a terminal (Command Prompt on Windows or Terminal on macOS/Linux) and navigate to the directory where you want to create or access your Jupyter Notebook. Then, run the following command:
jupyter notebook
This will start the Jupyter Notebook server and open a new tab in your web browser.
Create or open a notebook: In the Jupyter Notebook interface, navigate to the desired directory or create a new one by clicking on the "New" button and selecting "Notebook" under the "Notebooks" section. This will open a new notebook.
Install packages using shell commands: In a Jupyter Notebook cell, you can use the ! prefix to execute shell commands. To install packages, use the pip or conda command followed by the package name. For example, to install the numpy package, you can run the following command in a notebook cell:
!pip install numpy
or
!conda install numpy
Run the cell: After writing the installation command in a cell, press Shift + Enter to execute the cell. Jupyter Notebook will run the shell command and display the output in the notebook.
Verify the installation: To ensure the package was successfully installed, you can import it in another cell and run code that uses the package. For example, after installing numpy, you can write the following code in a new cell
import numpy as np
print(np.__version__)
If the package is installed correctly, it will import without any errors, and the version number will be displayed. Remember to run each installation command for each package in a separate cell and execute the cells to install and verify the packages.
Portions of this guide were generated or proofread by the OpenAI tool ChatGPT.