Skip to content

Commit c732cb4

Browse files
authored
Update install-python.md for newer Python versions
1 parent b64ffbb commit c732cb4

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

install-python.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<img src="https://training.talkpython.fm/static/img/cms/nopy-final.jpg" style="border-radius: 10px; display: block;" class="img img-responsive" />
44

5-
Welcome soon to be Python user! Python is one of the easiest programming languages to learn and grow with. But there are a few bumps right at the beginning. **One of these bumps is to make sure you have Python installed** and that it's a sufficiently new version (generally 3.9+ is solid these days).
5+
Welcome soon to be Python user! Python is one of the easiest programming languages to learn and grow with. But there are a few bumps right at the beginning. **One of these bumps is to make sure you have Python installed** and that it's a sufficiently new version (generally 3.10+ is solid these days).
66

77
Because how you install and verify Python varies by operating system, we've put together this short guide. It's goal is to give you exposure to the various ways on your operating system to **install and maintain Python in a concise and no-nonsense manner**. So with out further ado, let's get you setup!
88

@@ -35,7 +35,7 @@ The output should be one of the following (*version numbers will vary*). **C:\us
3535

3636
```
3737
C:\users\username\> python -V
38-
Python 3.11.0
38+
Python 3.12.0
3939
```
4040

4141
If you see this and the reported version number is sufficiently high (often 3.9 or higher), **you are good to go**.
@@ -118,7 +118,7 @@ The Windows Store version of Python is a good option. It's the easiest way to ge
118118

119119
1. Open the Microsoft Store on Windows
120120
2. Search for Python
121-
3. Find the latest version of Python from Microsoft (currently lists 3.7, 3.8, 3.9, 3.10, and [**3.11**](https://apps.microsoft.com/store/detail/python-311/9NRWMJP3717K?hl=en-us&gl=us))
121+
3. Find the latest version of Python from Microsoft (currently lists 3.7, 3.8, 3.9, 3.10, 3.11, and [**3.12**](https://apps.microsoft.com/detail/python-3-12/9NCVDN91XZQP?hl=en-us&gl=US))
122122
4. Install from the Microsoft Store
123123
5. Close all terminal and command prompt windows
124124
6. Run `python -V` in a new terminal window to verify you have Python now working
@@ -131,7 +131,7 @@ The Windows Store version of Python is a good option. It's the easiest way to ge
131131
**Pros**
132132

133133
* Will keep Python up-to-date on your system as long as you periodically run the upgrade command
134-
* Will update across versions (e.g. 3.10 -> 3.11)
134+
* Will update across versions (e.g. 3.11 -> 3.12)
135135
* Can inform you of pending upgrade if upgrade command is run
136136

137137
**Cons**
@@ -194,7 +194,7 @@ The output should be one of the following (*version numbers will vary*). Do not
194194

195195
```
196196
$ python3 -V
197-
Python 3.11.0
197+
Python 3.12.0
198198
```
199199

200200
If you see this and the reported version number is sufficiently high (often 3.9 or higher), **you are good to go**.
@@ -234,7 +234,7 @@ Looks like you do not have Python 3 at all. **You will need to continue below to
234234
**Pros**
235235

236236
* Will keep Python up-to-date on your system as long as you periodically run the upgrade command
237-
* Will update across versions (e.g. 3.10 -> 3.11)
237+
* Will update across versions (e.g. 3.11 -> 3.12)
238238
* Can inform you of pending upgrade if upgrade command is run
239239

240240
**Cons**
@@ -291,7 +291,7 @@ The Python official installer can be found on **[python.org](http://python.org)*
291291

292292
* Generally uses [conda environments](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html) rather than [Python's virtual environments](https://www.geeksforgeeks.org/python-virtual-environment/) - this can lead to a mismatch in instructions when Anaconda is not the primary tool used.
293293
* Packages available here often lag behind in release schedule from PyPI / pip
294-
* Often one whole version behind on Python (e.g. 3.10 rather than 3.11)
294+
* Often one whole version behind on Python (e.g. 3.11 rather than 3.12)
295295

296296
**Install steps - Anaconda distribution on Windows**
297297

@@ -324,10 +324,10 @@ The output should be one of the following (*version numbers will vary*). Don't t
324324

325325
```
326326
$ python3 -V
327-
Python 3.11.0
327+
Python 3.12.0
328328
```
329329

330-
If you see this and the reported version number is sufficiently high (often 3.9 or higher), **you are good to go**.
330+
If you see this and the reported version number is sufficiently high (often 3.10 or higher), **you are good to go**.
331331

332332
#### 2.7? Uh oh, your Python is badly outdated!
333333

@@ -366,13 +366,13 @@ Ubuntu manages it's installed software using **[apt](https://ubuntu.com/server/d
366366
**Pros**
367367

368368
* Will keep Python up-to-date on your system as long as you periodically run the upgrade command
369-
* Will update across versions (e.g. 3.10 -> 3.11)
369+
* Will update across versions (e.g. 3.11 -> 3.12)
370370
* Can inform you of pending upgrade if upgrade command is run
371371

372372
**Cons**
373373

374374
* Requires root permissions
375-
* Often lags badly behind the latest version (currently about 1.5 years behind)
375+
* Often lags badly behind the latest version (sometimes about 1.5 years behind)
376376

377377
**Install steps - apt package manager on Ubuntu**
378378

@@ -399,7 +399,7 @@ Ubuntu manages it's installed software using **[apt](https://ubuntu.com/server/d
399399

400400
* Generally uses [conda environments](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html) rather than [Python's virtual environments](https://www.geeksforgeeks.org/python-virtual-environment/) - this can lead to a mismatch in instructions when Anaconda is not the primary tool used.
401401
* Packages available here often lag behind in release schedule from PyPI / pip
402-
* Often one whole version behind on Python (e.g. 3.9 rather than 3.10)
402+
* Often one whole version behind on Python (e.g. 3.11 rather than 3.12)
403403

404404
**Install steps - Anaconda distribution on Ubuntu**
405405

@@ -432,14 +432,14 @@ While we would not generally recommend building Python 3 from source, if you nee
432432
3. Install the build tools: `sudo apt-get install -y build-essential checkinstall`
433433
4. Add additional libraries needed by Python to build: `apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libffi-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev`
434434
5. Change into the src directory: `cd /usr/src`
435-
6. Get the latest source from [python.org/downloads/source](https://www.python.org/downloads/source/) and wget it locally, e.g.: `sudo wget https://www.python.org/ftp/python/3.11.0/Python-3.11.0.tgz`
436-
7. Decompress it (varies by version): `sudo tar xzf Python-3.11.0.tgz`
437-
8. Change into the created directory (varies by version): `cd Python-3.11.0`
435+
6. Get the latest source from [python.org/downloads/source](https://www.python.org/downloads/source/) and wget it locally, e.g.: `sudo wget https://www.python.org/ftp/python/3.12.0/Python-3.12.0.tgz`
436+
7. Decompress it (varies by version): `sudo tar xzf Python-3.12.0.tgz`
437+
8. Change into the created directory (varies by version): `cd Python-3.12.0`
438438
9. Prepare it for compilation: `sudo ./configure --enable-optimizations`
439439
10. Compile it without modifying system Python: `sudo make altinstall`
440-
11. Verify this version was built (varies by version): `python3.11 --version`
441-
12. Use `python3.11` instead of `python` or `python3` commands
442-
13. Consider creating an [alias](https://www.howtogeek.com/73768/how-to-use-aliases-to-customize-ubuntu-commands/) of `python3.11` to `python` in your shell profile.
440+
11. Verify this version was built (varies by version): `python3.12 --version`
441+
12. Use `python3.12` instead of `python` or `python3` commands
442+
13. Consider creating an [alias](https://www.howtogeek.com/73768/how-to-use-aliases-to-customize-ubuntu-commands/) of `python3.12` to `python` in your shell profile.
443443

444444
There is a [nice write up of this procedure over here](https://towardsdatascience.com/building-python-from-source-on-ubuntu-20-04-2ed29eec152b).
445445

0 commit comments

Comments
 (0)