"
This article is part of in the series
Last Updated: Sunday 8th May 2022

installing python

Table of contents: 

  • Introduction
  • Python for windows – installation
  • Python for macOS – installation
  • Python for Linux – installation
  • Conclusion
  • Frequently Asked Questions

 

Introduction:

With over eight million developers using it, Python is one of the most popular programming languages in the world. The ubiquity of Python means that if you put effort into learning it today, you will reap massive benefits for years down the line. So, if you want to get started on Python, keep reading to learn about how you can install it on your machine!Explore Python Tutorial for more information.

Installing Python on Windows

  • There are two different versions of Python in use presently – Python 2 and Python 3. These versions differ in their syntax and functionality. Each version has its sub-versions available. You must decide which version of Python you want to download.

 

  • Go to the "Python for Windows" section on Python's official website – www.Python.org. There, you will find all the versions of Python that are available for download. The latest version, for example, is Python 3.10.4. Upon clicking download, you'll be shown a list of various executable installers, each with different system requirements. Select the one that is compatible with your machine's specs, and download it.

python 3.10.4

  • Once you're given the option to run the installer, select both the checkboxes – "Install launcher for all users" and "Add Python [version you chose] to PATH" – at the bottom of the dialog box. Then click on "Install Now." 

python 3.9.1

  • Once the installation has been completed, you'll be shown a dialog box informing you that "setup was successful." Then, you can verify that Python has indeed been successfully installed on your computer.

 

  • Open the Command Prompt and type "Python." If the installation were indeed successful, the version of Python you have chosen to download would be displayed.

command prompt

  • Finally, you need to verify if Pip has been successfully installed alongside Python. Pip is a powerful systems management package for Python, and hence it's ideal for checking if you have been able to download them both successfully. To verify the installation of Pip, open Command Prompt and enter "Pip-V." If Pip was correctly installed, the following output appears:

pip-v

Installing Python on MacOS

  • Download the executable installer from Python's official website. If you visit https://www.python.org/downloads/macos/, it will automatically detect your operating system and choose the installer optimized for your system's specs. If that doesn't work, simply click on the link for your preferred version of Python to manually select the installer.

python for mac

  • Once you have downloaded the installer, double-click the package to start installing Python. The installer will display a software wizard that'll guide you on the different steps you need to follow to complete the installation. In some instances, you might have to input your Mac password to let the system know that Python is being installed with your permission.

install python

  • Firstly, you'll be asked to agree with the Python license, which is Python Software Foundation License Version 2. Then, simply click on "install" to initiate the download! 

 

  • When the installation is finished, you'll be shown the Python folder. You can verify if Python and IDLE – Python's Integrated Development Environment- were installed correctly. To do that, double click on the IDLE file; if the installation is successful, you'll be shown the following Python shell:

idle shell

  • In the same folder, you'll find a file called "Install Certificates." Python uses a set of SSL Root Certificates to verify the identity of secure network connections. You need to install a current and curated bundle of those certificates from a third-party provider. Double click on Install Certificates to quickly download the necessary SSL certificates.

 

  • Finally, you can execute a simple program in IDLE to see if everything is functioning as it should.

 

NOTE: If you're using the Apple M1 Mac, you'll first need to install Rosetta if you don't already have it installed. It is a package than enables Intel-based features to run on Apple Silicon Macs. After you download it, it will work automatically in the background. You can install it via Command Line by giving the following command: "/usr/sbin/softwareupdate --install-rosetta --agree-to-license."

Check out Python Online Training & Certification Course to get yourself certified in Python with industry-level skills.

Installing Python for Linux

  • To install Python for Linux, you'll need a computer running the Debian or Fedora Operating System, with a minimum of 2GB RAM and 5GB disk space. You'll also need sudo access to the system.

 

  • On most Linux versions like Debian, Python comes already installed. You can check if Python is already installed by opening Command Prompt and typing in "python-v" or "python—version." If Python is not installed, the output will appear stating that "command 'python' not found."

python version

 

  • To install Python from Package Manager, input the following command: "sudo apt-get install python3.9" (replace 3.9 with your preferred version while installing). Type "Y" and press enter to continue. Package Manager will then install Python for you.

sudo apt

 

Alternatively, you can build Python from Source Code. To do so, follow these steps:

  • Obtain the source code. You can clone it from Python's official GitHub repository.

 

  • Configure the code. The Configuration Script includes many flags like –prefix, --enable-optimizations, etc. To configure a particular flag, navigate to the CPython directory where you have cloned the source code, then run the following command on your terminal: "./configure --prefix=$HOME/python3.9."

 

  • Finally, there is the Build process. Run the make tool to start the build process, and then the make install command to place the build files in the location specified by configures – prefix. The final output will be as follows:

build process

 

Conclusion

Python is one of the most popular programming languages around, and with good reason. Its ease of use, open-source support, and increased productivity have made it a favorite of many developers. Its compatibility with Windows, Mac, and Linux has only contributed to its widespread use.

We hope this article was able to answer all your questions about downloading Python on the operating system of your choice!

Frequently asked questions:

  • What is the most recent Python version?

Python 3.10 is the most recent version, and it includes numerous new features and optimizations. Its current release version is 3.10.4. It has library features, syntax features, interpreter improvements, and typing features. 

  • Python and the windows 11 compatibility?

We can install the latest version of Python on Windows 11. To install the most recent version of Python on Windows 11, go to the Python download website and select Windows Installer (64-bit) from the Stable Release section. When the download is complete, navigate to your downloads folder, double-click the installer, and install the latest python version on windows.

  • Can Python be used on any operating system?

Python is a cross-platform programming language that works on Windows, macOS, and Linux. When it comes to selecting an operating system, it is mostly a matter of personal preference. According to a 2020 survey, 45.8 percent of developers use Windows, 27.5 percent use macOS, and 26.6 percent use Linux.

  • Why does Python take this long to startup?

On Windows, Python generally starts easily, but there have been reports of bugs where Python unexpectedly starts to take ages to start up. A malfunctioning virus checking software on the problem machine could be the source of the problem. When configured to monitor all file system reads, some virus scanners have already been recognized to initiate startup overhead of two orders of magnitude. Check the configuration of your virus protection software on your programs to ensure that they are all configured the same way. 

  • How can we find bugs in Python and the tools to find them?

PyChecker is a program for detecting bugs in Python source code. PyChecker operates in a number of ways. It begins by importing each module. The module cannot be processed if there is an import error, and the import provides some basic module information. Each function, class, and method's code is examined for potential flaws. Check out for advanced Python Interview Questions to crack the interview easily.

  • Is Linux suitable for Python?

Python is extremely easy to use on Linux because there are fewer installation steps than on Windows. When working in Linux, it's also simple to switch between Python versions, and python learning would not be affected by the operating system.

  • Use of Python on mac?

In theory, Python on a Mac operating macOS is significantly related to Python with any other Unix platform. However, there are a few additional features worth mentioning, such as the IDE and the Package Manager.

 

Author Bio

Sai Priya Ravuri is a Digital Marketer, and a passionate writer, who is working with MindMajix, a top global online training provider. She also holds in-depth knowledge of IT and demanding technologies such as Business Intelligence, Machine Learning, Salesforce, Cybersecurity, Software Testing, QA, Data analytics, Project Management and ERP tools, etc.