How to download python
To start working with Python 3, you have to access the Python Interpreter. There are several common ways of accomplishing this:Python can be obtained from the Python Software Foundation website python.org. Typically, this involves downloading the appropriate installer for your operating system and running it on your machine.
Some operating systems, notably Linux, provide a package manager that can be run to install Python.
On MacOS, the best way to install Python 3 involves installing a package manager called HomeBrev. You will see how to do this in the related section in the tutorial.
On mobile operating systems such as Android and iOS, you can install applications that provide a Python programming environment. This can be a great way to practice your coding skills on the go.
Alternatively, there are several websites that allow you to use the online Python Interpreter without installing anything on your computer.
Note: There is a chance that Python is shipped with your operating system and is already installed. Even if it is, it may be that the installed version is older, in which case you might want to get the latest version anyway.
In this Python installation guide, you will see step by step how to set up a working Python 3 distribution on Windows, MacOS, Linux, iOS and Android. So let's get started!
remove ads
The windows
It is highly unlikely that your Windows system is shipped with an already installed Python. Windows systems usually do not. Fortunately, downloading the Python installer from the python.org website and installing it more than running it is not included. Let's take a look at how to install Python 3 on Windows:
Step 1: Download Python 3 Installer
Open a browser window and navigate to the download page for Windows at python.org.
Under the heading at the top that says Python Relies for Windows, click the link to the latest Python 3 release - Python 3.x.x. (As of this writing, the latest is Python 3.6.5.)
Scroll down to the bottom and select either the Windows x86-64 executable installer for 64-bit or the Windows x86 executable installer for 32-bit. (Look below.)
Sidebar: 32-bit or 64-bit Python?
For Windows, you can choose the 32-bit or 64-bit installer. Here is the difference between the two:
If your system has a 32-bit processor, you should select the 32-bit installer.
On 64-bit systems, either installer will actually work for most purposes. The 32-bit version will typically use less memory, but the 64-bit version performs better for applications with deeper computations.
If you are unsure which version to choose, go with the 64-bit version.
Note: Remember that if you get this option "wrong" and you want to switch to another version of Python, you can just uninstall Python and then re-install it by downloading another installer from python.org can do.
Step 2: Run the installer
Once you have selected and downloaded an installer, run it by double-clicking the downloaded file. A dialog should appear that looks something like this:
Windows installation dialog
Important: You want to make sure to check the box that says Add Python 3.x to PATH as shown to ensure that the interpreter will be placed in your execution path.
After that just click on Install Now. That's all it should be. After a few minutes you should have a Python 3 installation working on your system.
Windows Subsystem (WSL) for Linux
If you are running Windows 10 Creators or Anniversary Updates, you have another option to actually install Python. These versions of Windows 10 include a feature called the Windows Subsystem for Linux, which allows you to run Linux environments in Windows without Linux, directly from a virtual machine, and without a user.
For more information, see the Windows Subsystem for Linux Documentation article on the Microsoft website.
For instructions on how to enable the subsystem in Windows 10 and install the Linux distribution, see the Windows 10 Installation Guide.
One can also watch this presentation on YouTube by Sarah Cooley, one of the members of the WSL development team.
Once you install the Linux distribution of your choice, you can install Python 3 from the Bash console window, as if you were running that Linux distribution originally. (Look below.)
Linux
There is a very good chance that your Linux distribution already has Python installed, but it likely won't be the latest version, and it could be Python 2 instead of Python 3.
To find out which version you have, open a terminal window and try the following command:
Python - Immersion
python2 - immersion
python3 --version
One or more of these commands must respond with a variant as follows:
$ python3 --version
Python 3.6.5
If the version shown is a version of Python 2.x.x or Python 3 that is not the latest (3.6.5 as of this writing), you may want to install the latest version. The process of doing this will depend on the Linux distributor
2 Comments