You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
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.6+ 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.9+ is solid these days).
6
6
7
7
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!
8
8
@@ -35,12 +35,12 @@ The output should be one of the following (*version numbers will vary*). **C:\us
35
35
36
36
```
37
37
C:\users\username\> python -V
38
-
Python 3.9.2
38
+
Python 3.10.1
39
39
```
40
40
41
-
If you see this and the reported version number is sufficently high (often 3.6 or higher),**you are good to go**.
41
+
If you see this and the reported version number is sufficently high (often 3.9 or higher),**you are good to go**.
42
42
43
-
####Uh oh, your Python is badly outdated
43
+
####2.7?Uh oh, your Python is badly outdated!
44
44
45
45
```
46
46
C:\users\username\> python -V
@@ -107,7 +107,7 @@ The Windows Store version of Python is a good option. It's the easiest way to ge
107
107
**Pros**
108
108
109
109
* Easiest way to get Python on Windows**without administrator permissions**
110
-
* Will keep Python up-to-date automatically within a release version (3.9 updates but not 3.9->3.10)
110
+
* Will keep Python up-to-date automatically within a release version (3.10 updates but not 3.10->3.11)
111
111
* Maintained by the core developers who work at Microsoft
112
112
113
113
**Cons**
@@ -118,15 +118,15 @@ The Windows Store version of Python is a good option. It's the easiest way to ge
118
118
119
119
1. Open the Microsoft Store on Windows
120
120
2. Search for Python
121
-
3. Find the latest version of Python from Microsoft (currently lists 3.7, 3.8, and[**3.9**](https://www.microsoft.com/en-us/p/python-39/9p7qfqmjrfp7?activetab=pivot:overviewtab))
121
+
3. Find the latest version of Python from Microsoft (currently lists 3.7, 3.8,3.9,and[**3.10**](https://www.microsoft.com/store/productId/9PJPW5LDXLZ5))
122
122
4. Install from the Microsoft Store
123
123
5. Close all terminal and command prompt windows
124
124
6. Run`python -V` in a new terminal window to verify you have Python now working
125
125
126
126
127
127
####<<**Chocolatey Package Manager for Windows** >>
128
128
129
-
Chocolatey is a[package manager](https://en.wikipedia.org/wiki/Package_manager): software tools that automates the process of installing, upgrading, configuring, and removing computer programs for a computer's operating system in a consistent manner. If you're comfortable using package managers, then this is a good option for you because you can continually update and maintain Python on your system.
129
+
[Chocolatey](https://chocolatey.org/) is a[package manager](https://en.wikipedia.org/wiki/Package_manager): software tools that automates the process of installing, upgrading, configuring, and removing computer programs for a computer's operating system in a consistent manner. If you're comfortable using package managers, then this is a good option for you because you can continually update and maintain Python on your system.
130
130
131
131
**Pros**
132
132
@@ -146,7 +146,7 @@ Chocolatey is a [package manager](https://en.wikipedia.org/wiki/Package_manager)
146
146
2. Open an**[administrator command prompt](https://www.howtogeek.com/194041/how-to-open-the-command-prompt-as-administrator-in-windows-8.1/)**
147
147
3. Install the latest Python:`choco install python`
148
148
4. Peridocially check for a new release: Open admin command prompt and run`choco upgrade python`
149
-
5. Close all terminal and command prompt windows
149
+
5. Close all terminal and command prompt windows and reopen one (to refresh the path)
150
150
6. Run`python -V` in a new terminal window to verify you have Python now working
151
151
152
152
@@ -163,7 +163,7 @@ Chocolatey is a [package manager](https://en.wikipedia.org/wiki/Package_manager)
163
163
164
164
* Generally uses[conda environements](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.
165
165
* Packages available here often lag behind in release schedule from PyPI / pip
166
-
* Often one whole version behind on Python (e.g. 3.8 rather than 3.9)
166
+
* Often one whole version behind on Python (e.g. 3.9 rather than 3.10)
167
167
168
168
**Install steps - Anaconda distribution on Windows**
169
169
@@ -194,12 +194,12 @@ The output should be one of the following (*version numbers will vary*). Do not
194
194
195
195
```
196
196
$ python3 -V
197
-
Python 3.9.2
197
+
Python 3.10.1
198
198
```
199
199
200
200
If you see this and the reported version number is sufficently high (often 3.6 or higher),**you are good to go**.
201
201
202
-
####Uh oh, your Python is badly outdated
202
+
####2.7?Uh oh, your Python is badly outdated!
203
203
204
204
If`python3`**does NOT run successfully**, but`python` (without the 3) itself does and you see the output:
205
205
@@ -291,7 +291,7 @@ The Python official installer can be found on **[python.org](http://python.org)*
291
291
292
292
* Generally uses[conda environements](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.
293
293
* Packages available here often lag behind in release schedule from PyPI / pip
294
-
* Often one whole version behind on Python (e.g. 3.8 rather than 3.9)
294
+
* Often one whole version behind on Python (e.g. 3.9 rather than 3.10)
295
295
296
296
**Install steps - Anaconda distribution on Windows**
297
297
@@ -324,12 +324,12 @@ The output should be one of the following (*version numbers will vary*). Don't t
324
324
325
325
```
326
326
$ python3 -V
327
-
Python 3.9.2
327
+
Python 3.10.1
328
328
```
329
329
330
330
If you see this and the reported version number is sufficently high (often 3.6 or higher),**you are good to go**.
331
331
332
-
####Uh oh, your Python is badly outdated
332
+
####2.7?Uh oh, your Python is badly outdated!
333
333
334
334
If`python3`**does NOT run successfully**, but`python` (without the 3) itself does and you see the output:
* Generally uses[conda environements](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.
401
401
* Packages available here often lag behind in release schedule from PyPI / pip
402
-
* Often one whole version behind on Python (e.g. 3.8 rather than 3.9)
402
+
* Often one whole version behind on Python (e.g. 3.9 rather than 3.10)
403
403
404
-
**Install steps - Anaconda distribution onWindows**
404
+
**Install steps - Anaconda distribution onUbuntu**
405
405
406
406
1.[Download the Linux installer](https://www.anaconda.com/products/individual#)
407
407
2. Run the installer, add Python to path if asked
@@ -432,14 +432,14 @@ While we would not generally recommend building Python 3 from source, if you nee
432
432
3. Install the build tools:`sudo apt-get install -y build-essential checkinstall`
433
433
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`
434
434
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.9.2/Python-3.9.2.tgz`
436
-
7. Decompress it (varies by version):`sudo tar xzf Python-3.9.2.tgz`
437
-
8. Change into the created directory (varies by version):`cd Python-3.9.2`
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.10.1/Python-3.10.1.tgz`
436
+
7. Decompress it (varies by version):`sudo tar xzf Python-3.10.1.tgz`
437
+
8. Change into the created directory (varies by version):`cd Python-3.10.1`
438
438
9. Prepare it for compilation:`sudo ./configure --enable-optimizations`
439
439
10. Compile it without modifying system Python:`sudo make altinstall`
440
-
11. Verify this version was built (varies by version):`python3.9 --version`
13. Consider creating an[alias](https://www.howtogeek.com/73768/how-to-use-aliases-to-customize-ubuntu-commands/) of python3.9 to python in your shell profile.
440
+
11. Verify this version was built (varies by version):`python3.10 --version`
13. Consider creating an[alias](https://www.howtogeek.com/73768/how-to-use-aliases-to-customize-ubuntu-commands/) of`python3.10` to`python` in your shell profile.
443
443
444
444
There is a[nice write up of this procedure over here](https://towardsdatascience.com/building-python-from-source-on-ubuntu-20-04-2ed29eec152b).
445
445
@@ -450,4 +450,4 @@ There is a [nice write up of this procedure over here](https://towardsdatascienc
450
450
451
451
If you find a problem or have a suggestion to make this page better, please visit the GitHub repository here. Note that this is not intended for tech support but rather for genuine, broadly applicable improvements to the instructions: