Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 48 additions & 7 deletions lectures/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ kernelspec:
</style>


# Setting up Your Python Environment
# Getting Started

```{index} single: Python
```
Expand All @@ -43,12 +43,53 @@ kernelspec:

In this lecture, you will learn how to

1. get a Python environment up and running
1. use Python in the cloud
1. get a local Python environment up and running
1. execute simple Python commands
1. run a sample program
1. install the code libraries that underpin these lectures

## Anaconda
## Python in the Cloud

The easiest way to get started coding in Python is by running it in the cloud.

(That is, by using a remote server that already has Python installed.)

There are many options for doing this, both free and paid.

At present [Google Colab](https://colab.research.google.com/) seems to be the
most reliable.

Colab offers a free tier and also has the advantage of providing GPUs.

The free-tier GPUs are adequate and better ones can be accessed by signing up
for Colab Pro.

Tutorials on how to get started with Google Colab can be found by searching.

Written examples include

* [Google Colab Tutorial for Beginners](https://pub.towardsai.net/google-colab-tutorial-for-beginners-834595494d44)
* [Intro to Google
Colab](https://levelup.gitconnected.com/google-colab-what-is-it-how-to-use-it-and-why-should-i-care-721bb8a88c90)

Videos on the same topic can be found by searching on Youtube.

Most of our lectures include a "Launch notebook" (play icon) button on the top
right that allows you to easily run them in Colab.


## Local Install

Local installs are preferable if you have access to a suitable machine and
plan to do a substantial amount of Python programming.

At the same time, local installs require more work than a cloud option like Colab.

The rest of this lecture runs you through the details.


### The Anaconda Distribution

The [core Python package](https://www.python.org/downloads/) is easy to install but *not* what you should choose for these lectures.

Expand All @@ -69,7 +110,7 @@ Anaconda is
* very popular
* cross-platform
* comprehensive
* completely unrelated to the Nicki Minaj song of the same name
* completely unrelated to the [Nicki Minaj song of the same name](https://www.youtube.com/watch?v=LDZX4ooRsWs)

Anaconda also comes with a great package management system to organize your code libraries.

Expand All @@ -91,9 +132,9 @@ Important points:

### Updating Anaconda

Anaconda supplies a tool called conda to manage and upgrade your Anaconda packages.
Anaconda supplies a tool called `conda` to manage and upgrade your Anaconda packages.

One conda command you should execute regularly is the one that updates the whole Anaconda distribution.
One `conda` command you should execute regularly is the one that updates the whole Anaconda distribution.

As a practice run, please execute the following

Expand Down Expand Up @@ -574,4 +615,4 @@ For reading on these and other topics, try
* One of the thousands of Git tutorials on the Net.

```{exercise-end}
```
```