GitHub

@@ -30,7 +30,7 @@ kernelspec:

3030

</style>

3131323233-

# Setting up Your Python Environment

33+

# Getting Started

34343535

```{index} single: Python

3636

```

@@ -43,12 +43,53 @@ kernelspec:

43434444

In this lecture, you will learn how to

454546-

1. get a Python environment up and running

46+

1. use Python in the cloud

47+

1. get a local Python environment up and running

4748

1. execute simple Python commands

4849

1. run a sample program

4950

1. install the code libraries that underpin these lectures

505151-

## Anaconda

52+

## Python in the Cloud

53+54+

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

55+56+

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

57+58+

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

59+60+

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

61+

most reliable.

62+63+

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

64+65+

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

66+

for Colab Pro.

67+68+

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

69+70+

Written examples include

71+72+

* [Google Colab Tutorial for Beginners](https://pub.towardsai.net/google-colab-tutorial-for-beginners-834595494d44)

73+

* [Intro to Google

74+

Colab](https://levelup.gitconnected.com/google-colab-what-is-it-how-to-use-it-and-why-should-i-care-721bb8a88c90)

75+76+

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

77+78+

Most of our lectures include a "Launch notebook" (play icon) button on the top

79+

right that allows you to easily run them in Colab.

80+81+82+

## Local Install

83+84+

Local installs are preferable if you have access to a suitable machine and

85+

plan to do a substantial amount of Python programming.

86+87+

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

88+89+

The rest of this lecture runs you through the details.

90+91+92+

### The Anaconda Distribution

52935394

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

5495

@@ -69,7 +110,7 @@ Anaconda is

69110

* very popular

70111

* cross-platform

71112

* comprehensive

72-

* completely unrelated to the Nicki Minaj song of the same name

113+

* completely unrelated to the [Nicki Minaj song of the same name](https://www.youtube.com/watch?v=LDZX4ooRsWs)

7311474115

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

75116

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

9113292133

### Updating Anaconda

9313494-

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

135+

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

9513696-

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

137+

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

9713898139

As a practice run, please execute the following

99140

@@ -574,4 +615,4 @@ For reading on these and other topics, try

574615

* One of the thousands of Git tutorials on the Net.

575616576617

```{exercise-end}

577-

```

618+

```

Read the original on github.com ↗