- Installing a terminal
- Installing Anaconda
- Testing your environment
A terminal (also known as the command line or console) is a program that allows you to type and execute text-based commands to control actions on your computer.
There are several options for your terminal, but please install Git-Bash for this class.
If you are using macOS or Linux, you already have a program called
Anaconda is a Python and R distribution that contains various packages used in data science and machine learning. It also includes an environment management system called Conda, which allows you to easily install/update packages and create/load environments. This allows you to, for example, work with different versions of Python on the same computer by creating a separate environment for each.
Please download Anaconda here.
Let’s make sure everything is set up correctly and get more familiar with using our terminal.
First, open your terminal. You should get something like the following:
Don’t worry if your terminal looks slightly different. However, make sure that you see either a dollar sign ($) or a percent sign (%), waiting for you to type a command.
We will first have our terminal show us a list of all files and folders in the current directory. Try typing
ls into the terminal:
You should now see all the contents of your home directory. For me, I have the following:
Choose a place on your computer where you would like to store your files for this class. Let’s make a folder called
dsper in your
First, we will need to move to the
Documents folder, using the
cd command. Let’s type the following into our terminal:
Now, we’re in the
Next, let’s create a new folder called
dsper, using the
Now, if you type
ls (while still in the
Documents folder), you should see your new
To move to the parent directory of whatever directory you’re in, you can use
cd ... To move to your home directory, use
On your terminal, use
cd to move into
dsper, or the folder you would like to work in for this class. Jupyter Notebook is a web application that allows us to work with live code and data visualizations right in our browser.
Type the following into your terminal:
This will launch a Jupyter Notebook server in your browser at
http://localhost:8888/. If it doesn’t open automatically, copy and paste
http://localhost:8888/ into your browser. You should see something like the following:
Let’s click on
New on the right side, and select
You now have created a new Jupyter Notebook! Type
print('Hello World') into the first cell and then press
Enter while holding the
Shift key to run this cell:
To shut down your Jupyter Notebook server, type
ctrl + c into your terminal.
You will complete your homework assignments in these notebooks.