Skip to content

Commit 89aedaa

Browse files
committed
Changes to 3.10
Changes to 3.10 from 3.9 for 2022
1 parent 5023131 commit 89aedaa

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

installing-python-linux.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ In this course, you'll be writing lots of Python code, so it's important to get
1010

1111
Throughout this document, we will:
1212

13-
1. Install Python 3.9.2
13+
1. Install Python 3.10.3
1414
2. Create a virtual environment using this version of Python.
1515
3. Inside this environment, install useful packages.
1616

@@ -20,7 +20,7 @@ Let's get started!
2020

2121
We assume that you have a basic familiarity with the command line. We understand that not everyone will feel comfortable with the command line, because it is covered starting in CS107. However, I highly recommend using Nick Troccoli's amazing [CS107 resources](https://web.stanford.edu/class/archive/cs/cs107/cs107.1214/resources/) for this quarter if you feel less experienced, particular the section titled "Common Unix Commands."
2222

23-
## Install Python 3.9.2
23+
## Install Python 3.10.3
2424

2525
On different Linux systems, there are a couple of different ways to install and manage packages. We'll cover `apt-get` here, as well as how you can install from source.
2626

@@ -31,25 +31,25 @@ On different Linux systems, there are a couple of different ways to install and
3131
```
3232
$ sudo add-apt-repository ppa:deadsnakes/ppa
3333
$ sudo apt-get update
34-
$ sudo apt-get install python3.9
35-
$ sudo apt-get install python3.9-venv
34+
$ sudo apt-get install python3.10
35+
$ sudo apt-get install python3.10-venv
3636
```
3737

38-
On Debian, we'll just have to `sudo apt-get install python3` and hope for the best. Also note that this might install a different version of Python 3.9, but we won't worry about that here.
38+
On Debian, we'll just have to `sudo apt-get install python3` and hope for the best. Also note that this might install a different version of Python 3.10, but we won't worry about that here.
3939

4040
### Installing with `yum` (RedHat, CentOS)
4141

4242
Other Linux distributions use a different package manager, `yum`. We don't have any test devices with these Linux distributions, so you're on your own here. There is a reasonably good tutorial for CentOS [here](https://www.digitalocean.com/community/tutorials/how-to-install-python-3-and-set-up-a-local-programming-environment-on-centos-7).
4343

4444
### Other Linux package managers
4545

46-
The world of Linux distributions is unfathomably large. If you can pull off a Python 3.9 install on your distribution of choice, more power to you. However, we recommend building from source.
46+
The world of Linux distributions is unfathomably large. If you can pull off a Python 3.10 install on your distribution of choice, more power to you. However, we recommend building from source.
4747

4848
### Installing from source
4949

5050
Installing Python from source follows the same pattern as most other source installations.
5151

52-
First, download the source tarball (either [gzipped](https://www.python.org/ftp/python/3.9.2/Python-3.9.2.tgz) or [XZ compressed](https://www.python.org/ftp/python/3.9.2/Python-3.9.2.tar.xz)). Unzip the files and `cd` into the unzipped directory.
52+
First, download the source tarball (either [gzipped](https://www.python.org/ftp/python/3.10.3/Python-3.10.3.tgz) or [XZ compressed](https://www.python.org/ftp/python/3.10.3/Python-3.10.3.tar.xz)). Unzip the files and `cd` into the unzipped directory.
5353

5454
To build Python, just execute the usual commands:
5555

installing-python-windows.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ Once you're in the `bash` shell, you can follow the [Linux](https://github.com/s
3030
```
3131
$ sudo add-apt-repository ppa:deadsnakes/ppa
3232
$ sudo apt-get update
33-
$ sudo apt-get install python3.9
34-
$ sudo apt-get install python3.9-venv
33+
$ sudo apt-get install python3.10
34+
$ sudo apt-get install python3.10-venv
3535
```
3636

3737
You can check which version of Python you've installed by running:
3838

3939
```
4040
$ python3 --version
41-
Python 3.9.2
41+
Python 3.10.3
4242
```
4343

4444
In broad strokes, you will need to run the following commands to set up a virtual environment. The Linux and macOS handouts contain more detailed information.
@@ -60,7 +60,7 @@ Working with Windows is complicated enough, so we're going to omit the instructi
6060

6161
Recall that we discourage this option as it is very complex and hard for us to debug. Only use this option if the above fails and you don't want to use a VM (Strategy 3) for some reason.
6262

63-
You will need Windows 8.1 or newer to use Python 3.9.2 on Windows.
63+
You will need Windows 8.1 or newer to use Python 3.10.3 on Windows.
6464

6565
When in doubt, the source of truth for Windows commands is [included in the Python documentation](https://docs.python.org/3/using/windows.html), and you can find more details on using virtual environments [here](https://docs.python.org/3/library/venv.html#module-venv).
6666

@@ -70,13 +70,13 @@ The rough outline is:
7070
2. Create a virtual environment.
7171
3. Use `pip` to install useful packages.
7272

73-
First, download the web-based installer from the [Python 3.9.2 releases page](https://www.python.org/downloads/release/python-392/), either for [x86-64](https://www.python.org/ftp/python/3.9.2/python-3.9.2-amd64-webinstall.exe) or [x86](https://www.python.org/ftp/python/3.9.2/python-3.9.2-webinstall.exe). The web-based installer is a small download which will connect to the internet to download any additional required components, so make sure that you are connected to the internet for the remainder of these installation instructions.
73+
First, download the web-based installer from the [Python 3.10.3 releases page](https://www.python.org/downloads/release/python-392/), either for [x86-64](https://www.python.org/ftp/python/3.10.3/python-3.10.3-amd64-webinstall.exe) or [x86](https://www.python.org/ftp/python/3.10.3/python-3.10.3-webinstall.exe). The web-based installer is a small download which will connect to the internet to download any additional required components, so make sure that you are connected to the internet for the remainder of these installation instructions.
7474

75-
Start the installer. You will see two options: "Install launcher for all users (recommended)" and "Add Python 3.9 to PATH". Make sure both are selected, and then click "Install Now."
75+
Start the installer. You will see two options: "Install launcher for all users (recommended)" and "Add Python 3.10 to PATH". Make sure both are selected, and then click "Install Now."
7676

7777
*Note: Technically, you should also [remove the MAX_PATH limitation](https://docs.python.org/3/using/windows.html#removing-the-max-path-limitation), but we'll skip that for now.*
7878

79-
Follow the on-screen instructions to finish installing Python. When you are given the option of unchecking any 'optional' components, do not uncheck any. In particular, if there is an option called "Add python.exe to search path" on the "Customize Python 3.9" screen, make sure that box is checked! You should also see that `pip` is being installed by default.
79+
Follow the on-screen instructions to finish installing Python. When you are given the option of unchecking any 'optional' components, do not uncheck any. In particular, if there is an option called "Add python.exe to search path" on the "Customize Python 3.10" screen, make sure that box is checked! You should also see that `pip` is being installed by default.
8080

8181
Let's check to see that everything was installed correctly.
8282

@@ -89,21 +89,21 @@ Open up PowerShell or `cmd.exe` and run the following from a command prompt:
8989
You should see something like the following:
9090

9191
```
92-
Python 3.9.2 (v3.9.2:1a79785e3e, Feb 19 2021, 09:06:10)
92+
Python 3.10.3 (v3.10.3:1a79785e3e, Feb 19 2021, 09:06:10)
9393
[Clang 6.0 (clang-600.0.57)] on darwin
9494
Type "help", "copyright", "credits" or "license" for more information.
9595
>>>
9696
```
9797

98-
Ensure that the Python version above looks like 3.9.2.
98+
Ensure that the Python version above looks like 3.10.3.
9999

100100
If that doesn't work, try running:
101101

102102
```
103103
> python
104104
```
105105

106-
If this drops you into a Python 3.9.2 interactive interpreter, great! In this case, everywhere you see `python3` below, replace it with the command `python`.
106+
If this drops you into a Python 3.10.3 interactive interpreter, great! In this case, everywhere you see `python3` below, replace it with the command `python`.
107107

108108
If this didn't work, try running:
109109

@@ -116,16 +116,16 @@ If this worked, then everywhere you see `python3` below, replace it with the com
116116
Try writing some Python in the interactive interpreter! When you're done, you can exit the interactive interpreter with `CTRL+C` or by entering `quit()` at the Python command prompt.
117117

118118
### Checking `pip`
119-
First, let's check that we have `pip` installed. For CS41, we'll be using a package manager called `pip` to install and manage Python software packages. By default, Python 3.9.2 ships with a version of `pip` prebuilt. `pip` interacts very well with PyPI (the Python Package Index), so we'll be using `pip` extensively this quarter.
119+
First, let's check that we have `pip` installed. For CS41, we'll be using a package manager called `pip` to install and manage Python software packages. By default, Python 3.10.3 ships with a version of `pip` prebuilt. `pip` interacts very well with PyPI (the Python Package Index), so we'll be using `pip` extensively this quarter.
120120

121121
At a command prompt, run the following code. You should see something like the following output:
122122

123123
```
124124
> python3 -m pip --version
125-
pip 21.0.1 from /pip 21.0.1 from C:\Users\Parth\AppData\Local\Programs\Python\Python38\lib\site-packages (python 3.9)
125+
pip 21.0.1 from /pip 21.0.1 from C:\Users\Parth\AppData\Local\Programs\Python\Python38\lib\site-packages (python 3.10)
126126
```
127127

128-
Problems might arise if you had a different version of Python 3 already installed, but if you added Python 3.9 to your PATH, this should work.
128+
Problems might arise if you had a different version of Python 3 already installed, but if you added Python 3.10 to your PATH, this should work.
129129

130130
### Create a Virtual Environment
131131

0 commit comments

Comments
 (0)