{"id":1573,"date":"2026-10-20T12:28:33","date_gmt":"2026-10-20T12:28:33","guid":{"rendered":"https:\/\/prwatech.in\/blog\/?p=1573"},"modified":"2026-10-21T10:51:58","modified_gmt":"2026-10-21T10:51:58","slug":"how-to-install-and-run-python-on-windows","status":"publish","type":"post","link":"https:\/\/prwatech.in\/blog\/python\/python-introduction\/how-to-install-and-run-python-on-windows\/","title":{"rendered":"Install and Run Python on Windows"},"content":{"rendered":"<h1><strong><b>How to Install and Run Python on Windows, Mac and Ubuntu<\/b><\/strong><\/h1>\n<p style=\"font-family: Arial,Helvetica,sans-serif; font-size: 17px; line-height: 1.7; color: #1f2937; margin: 0 0 16px;\">Every Python programmer starts in the same place: a fresh computer with no Python on it, and a download page with more buttons than you expected. The install is easy, but one small step, ticking a single box on Windows, decides whether the next ten minutes go smoothly or end with the words &#8220;python is not recognized as an internal or external command&#8221;.<\/p>\n<p style=\"font-family: Arial,Helvetica,sans-serif; font-size: 17px; line-height: 1.7; color: #1f2937; margin: 0 0 16px;\">Python is free, and it runs on Windows, Mac and Linux. To write and run programs, you install the Python interpreter, which is the program that reads your code and carries it out. You then check that it works by opening a terminal and running a small program.<\/p>\n<p style=\"font-family: Arial,Helvetica,sans-serif; font-size: 17px; line-height: 1.7; color: #1f2937; margin: 0 0 16px;\">In this guide, we cover installing and running Python on Windows, Mac and Ubuntu, one system at a time. For Windows, we show both the new Python install manager and the traditional installer, including the PATH step that causes most problems. We then show how to check your version, run your first program, create a virtual environment, and fix the common errors. The first program and the virtual environment steps were run on Ubuntu 24.04, and the other steps follow the official Python documentation.<\/p>\n<h2 style=\"font-family: Arial,Helvetica,sans-serif; font-size: 26px; line-height: 1.3; font-weight: bold; color: #0f2a4a; margin: 36px 0 12px;\">Python Installation on Windows, Ubuntu and Mac<\/h2>\n<p style=\"font-family: Arial,Helvetica,sans-serif; font-size: 17px; line-height: 1.7; color: #1f2937; margin: 0 0 16px;\">The steps differ a little on each system, so pick the section that matches your computer.<\/p>\n<div style=\"margin: 16px 0 24px;\"><img loading=\"lazy\" decoding=\"async\" style=\"display: block; max-width: 100%; height: auto; border: 1px solid #d9e0ea; border-radius: 8px;\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/1.png\" alt=\"online training on python\" width=\"850\" height=\"379\" \/><\/div>\n<h2 style=\"font-family: Arial,Helvetica,sans-serif; font-size: 26px; line-height: 1.3; font-weight: bold; color: #0f2a4a; margin: 36px 0 12px;\">Which Python Version Should You Install?<\/h2>\n<p style=\"font-family: Arial,Helvetica,sans-serif; font-size: 17px; line-height: 1.7; color: #1f2937; margin: 0 0 16px;\">Python 3.15.0 is the newest release. The python.org release page marks it as stable, and gives 9 October 2026 as its release date. Older versions such as Python 3.6.7 no longer get security fixes, so do not use them.<\/p>\n<p style=\"font-family: Arial,Helvetica,sans-serif; font-size: 17px; line-height: 1.7; color: #1f2937; margin: 0 0 16px;\">Take the latest version unless a course or a company tells you otherwise. Some libraries take a few months to support a brand new version, so if something does not install, Python 3.14 is a safe fallback. Python 2 is long gone, and nothing in this guide applies to it.<\/p>\n<div style=\"border: 1px solid #d9e0ea; border-radius: 8px; overflow-x: auto; margin: 20px 0; -webkit-overflow-scrolling: touch;\">\n<table style=\"width: 100%; min-width: 640px; border-collapse: collapse; font-family: Arial,Helvetica,sans-serif; font-size: 16px; line-height: 1.6; color: #1f2937;\">\n<caption style=\"caption-side: top; text-align: left; padding: 14px 16px; font-weight: bold; font-size: 17px; color: #0f2a4a;\">What each system needs<\/caption>\n<thead>\n<tr>\n<th style=\"background: #0f2a4a; color: #ffffff; text-align: left; padding: 12px 16px; border-bottom: 2px solid #0b1f38; width: 140px;\" scope=\"col\">System<\/th>\n<th style=\"background: #0f2a4a; color: #ffffff; text-align: left; padding: 12px 16px; border-bottom: 2px solid #0b1f38;\" scope=\"col\">What you need<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"background: #ffffff;\">\n<th style=\"text-align: left; padding: 12px 16px; border-bottom: 1px solid #e5e9f0; color: #0f2a4a; vertical-align: top;\" scope=\"row\">Windows<\/th>\n<td style=\"padding: 12px 16px; border-bottom: 1px solid #e5e9f0;\">Windows 10 or newer for Python 3.15. Windows 8.1 can use Python 3.12, and Windows 7 can use Python 3.8<\/td>\n<\/tr>\n<tr style=\"background: #f5f8fc;\">\n<th style=\"text-align: left; padding: 12px 16px; border-bottom: 1px solid #e5e9f0; color: #0f2a4a; vertical-align: top;\" scope=\"row\">Mac<\/th>\n<td style=\"padding: 12px 16px; border-bottom: 1px solid #e5e9f0;\">The installer supports macOS 10.15 and later, on both Intel and Apple Silicon Macs<\/td>\n<\/tr>\n<tr style=\"background: #ffffff;\">\n<th style=\"text-align: left; padding: 12px 16px; color: #0f2a4a; vertical-align: top;\" scope=\"row\">Ubuntu<\/th>\n<td style=\"padding: 12px 16px;\">Python usually comes preinstalled. Ubuntu 24.04 ships Python 3.12<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h2 style=\"font-family: Arial,Helvetica,sans-serif; font-size: 26px; line-height: 1.3; font-weight: bold; color: #0f2a4a; margin: 36px 0 12px;\">How to Install Python on Windows<\/h2>\n<p style=\"font-family: Arial,Helvetica,sans-serif; font-size: 17px; line-height: 1.7; color: #1f2937; margin: 0 0 16px;\">There are two ways. The Python install manager is the one the official docs recommend now. The traditional installer still works for Python 3.15, although it is deprecated. Pick one.<\/p>\n<h3 style=\"font-family: Arial,Helvetica,sans-serif; font-size: 21px; line-height: 1.35; font-weight: bold; color: #0f2a4a; margin: 28px 0 10px;\">Option 1: Python Install Manager (Recommended)<\/h3>\n<ol style=\"font-family: Arial,Helvetica,sans-serif; font-size: 17px; line-height: 1.7; color: #1f2937; margin: 0 0 16px; padding-left: 28px;\">\n<li style=\"margin: 0 0 8px;\">Open the Python downloads page on the python.org website, and download the Python install manager. You can also get it from the Microsoft Store, and the official docs say the two are identical.<\/li>\n<li style=\"margin: 0 0 8px;\">Run the file you downloaded and choose Install. From the Store, click Install.<\/li>\n<li style=\"margin: 0 0 8px;\">The first time you install a Python version, you may be asked to add a folder to your PATH. This is optional. If you want to type <code style=\"font-family: 'Courier New',Courier,monospace; font-size: 15px; background: #eef2f7; padding: 2px 6px; border-radius: 4px;\">python<\/code> in a terminal, say yes.<\/li>\n<li style=\"margin: 0 0 8px;\">Open a terminal, either the Command Prompt or PowerShell, and type <code style=\"font-family: 'Courier New',Courier,monospace; font-size: 15px; background: #eef2f7; padding: 2px 6px; border-radius: 4px;\">python<\/code>. If you see the version and a prompt that looks like three arrow signs, Python works.<\/li>\n<\/ol>\n<p style=\"font-family: Arial,Helvetica,sans-serif; font-size: 17px; line-height: 1.7; color: #1f2937; margin: 0 0 16px;\">To see which versions the manager has installed, run <code style=\"font-family: 'Courier New',Courier,monospace; font-size: 15px; background: #eef2f7; padding: 2px 6px; border-radius: 4px;\">py list<\/code> in the terminal. The manager can also install a version for you, with a command such as <code style=\"font-family: 'Courier New',Courier,monospace; font-size: 15px; background: #eef2f7; padding: 2px 6px; border-radius: 4px;\">py install 3.15<\/code>.<\/p>\n<h3 style=\"font-family: Arial,Helvetica,sans-serif; font-size: 21px; line-height: 1.35; font-weight: bold; color: #0f2a4a; margin: 28px 0 10px;\">Option 2: The Traditional Installer<\/h3>\n<p style=\"font-family: Arial,Helvetica,sans-serif; font-size: 17px; line-height: 1.7; color: #1f2937; margin: 0 0 16px;\">Use this if you prefer the classic installer, or you are following a course that uses it. The screenshots below come from an older Python installer, so your screens may look a little different, but the steps are the same.<\/p>\n<h3 style=\"font-family: Arial,Helvetica,sans-serif; font-size: 21px; line-height: 1.35; font-weight: bold; color: #0f2a4a; margin: 28px 0 10px;\">Step 1: Run the Installer<\/h3>\n<p style=\"font-family: Arial,Helvetica,sans-serif; font-size: 17px; line-height: 1.7; color: #1f2937; margin: 0 0 16px;\">Download the Windows installer from the downloads page. Choose the 64 bit installer for any modern computer. Double click the file you downloaded. The first screen offers two choices: Install Now, and Customize installation. Install Now is the simple choice. It does not need administrator rights, and it installs Python in your own user folder. Choose Customize installation if you want to see the options, as in the next steps.<\/p>\n<div style=\"margin: 16px 0 24px;\"><img loading=\"lazy\" decoding=\"async\" style=\"display: block; max-width: 100%; height: auto; border: 1px solid #d9e0ea; border-radius: 8px;\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/2.png\" alt=\"online course on python\" width=\"850\" height=\"525\" \/><\/div>\n<h3 style=\"font-family: Arial,Helvetica,sans-serif; font-size: 21px; line-height: 1.35; font-weight: bold; color: #0f2a4a; margin: 28px 0 10px;\">Step 2: Optional Features<\/h3>\n<p style=\"font-family: Arial,Helvetica,sans-serif; font-size: 17px; line-height: 1.7; color: #1f2937; margin: 0 0 16px;\">If you chose Customize, the next screen lists the optional features. These include the documentation, pip (the package installer), IDLE (a simple editor) and the py launcher. They are optional, but the default selection is good, and you should leave it as it is. Click Next.<\/p>\n<div style=\"margin: 16px 0 24px;\"><img loading=\"lazy\" decoding=\"async\" style=\"display: block; max-width: 100%; height: auto; border: 1px solid #d9e0ea; border-radius: 8px;\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/3.png\" alt=\"online course to learn python\" width=\"850\" height=\"522\" \/><\/div>\n<h3 style=\"font-family: Arial,Helvetica,sans-serif; font-size: 21px; line-height: 1.35; font-weight: bold; color: #0f2a4a; margin: 28px 0 10px;\">Step 3: Advanced Options and the PATH Box<\/h3>\n<p style=\"font-family: Arial,Helvetica,sans-serif; font-size: 17px; line-height: 1.7; color: #1f2937; margin: 0 0 16px;\">The next screen lists advanced options. This is where the biggest beginner problem is solved. Make sure the box named Add python.exe to PATH is ticked. On some versions it is on the first screen, and on others it is on this one. The wording can differ a little.<\/p>\n<p style=\"font-family: Arial,Helvetica,sans-serif; font-size: 17px; line-height: 1.7; color: #1f2937; margin: 0 0 16px;\">You do not need to tick install for all users. That option needs administrator rights and puts Python in the Program Files folder. A normal single user install is fine for learning.<\/p>\n<div style=\"margin: 16px 0 24px;\"><img loading=\"lazy\" decoding=\"async\" style=\"display: block; max-width: 100%; height: auto; border: 1px solid #d9e0ea; border-radius: 8px;\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/4.png\" alt=\"online python programming course\" width=\"850\" height=\"524\" \/><\/div>\n<h3 style=\"font-family: Arial,Helvetica,sans-serif; font-size: 21px; line-height: 1.35; font-weight: bold; color: #0f2a4a; margin: 28px 0 10px;\">Step 4: Install<\/h3>\n<p style=\"font-family: Arial,Helvetica,sans-serif; font-size: 17px; line-height: 1.7; color: #1f2937; margin: 0 0 16px;\">Click Install, and wait. When it finishes, you see a message that setup was successful. Click Close.<\/p>\n<div style=\"margin: 16px 0 24px;\"><img loading=\"lazy\" decoding=\"async\" style=\"display: block; max-width: 100%; height: auto; border: 1px solid #d9e0ea; border-radius: 8px;\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/5.png\" alt=\"online python training course\" width=\"850\" height=\"516\" \/><\/div>\n<h3 style=\"font-family: Arial,Helvetica,sans-serif; font-size: 21px; line-height: 1.35; font-weight: bold; color: #0f2a4a; margin: 28px 0 10px;\">Step 5: Try Python in the Command Prompt<\/h3>\n<p style=\"font-family: Arial,Helvetica,sans-serif; font-size: 17px; line-height: 1.7; color: #1f2937; margin: 0 0 16px;\">Open the Command Prompt. Press the Windows key, type <code style=\"font-family: 'Courier New',Courier,monospace; font-size: 15px; background: #eef2f7; padding: 2px 6px; border-radius: 4px;\">cmd<\/code>, and press Enter. Then type the command below and press Enter.<\/p>\n<div style=\"margin: 20px 0; border: 1px solid #d9e0ea; border-radius: 8px; overflow: hidden;\">\n<div style=\"background: #0f2a4a; color: #ffffff; font-family: Arial,Helvetica,sans-serif; font-size: 14px; font-weight: bold; padding: 8px 16px;\">terminal<\/div>\n<pre style=\"margin: 0; padding: 16px; color: #1f2937; font-family: 'Courier New',Courier,monospace; font-size: 14px; line-height: 1.7; overflow-x: auto; white-space: pre; background: #f5f8fc;\">python --version<\/pre>\n<div style=\"background: #1f2937; color: #ffffff; font-family: Arial,Helvetica,sans-serif; font-size: 14px; font-weight: bold; padding: 8px 16px;\">output<\/div>\n<pre style=\"margin: 0; padding: 16px; color: #1f2937; font-family: 'Courier New',Courier,monospace; font-size: 14px; line-height: 1.7; overflow-x: auto; white-space: pre; background: #ffffff;\">Python 3.15.0<\/pre>\n<\/div>\n<p style=\"font-family: Arial,Helvetica,sans-serif; font-size: 17px; line-height: 1.7; color: #1f2937; margin: 0 0 16px;\">Your version number will match the one you installed. If you see it, you are done, and you can skip to the section on running your first program. If you see this error instead, the PATH box was not ticked:<\/p>\n<div style=\"margin: 20px 0; border: 1px solid #d9e0ea; border-radius: 8px; overflow: hidden;\">\n<div style=\"background: #1f2937; color: #ffffff; font-family: Arial,Helvetica,sans-serif; font-size: 14px; font-weight: bold; padding: 8px 16px;\">error<\/div>\n<pre style=\"margin: 0; padding: 16px; color: #1f2937; font-family: 'Courier New',Courier,monospace; font-size: 14px; line-height: 1.7; overflow-x: auto; white-space: pre; background: #ffffff;\">'python' is not recognized as an internal or external command,\r\noperable program or batch file.<\/pre>\n<\/div>\n<p style=\"font-family: Arial,Helvetica,sans-serif; font-size: 17px; line-height: 1.7; color: #1f2937; margin: 0 0 16px;\">This means Windows does not know where Python is, because the path was not set. The fix is in the next steps, and it is the same whichever install method you used.<\/p>\n<div style=\"margin: 16px 0 24px;\"><img loading=\"lazy\" decoding=\"async\" style=\"display: block; max-width: 100%; height: auto; border: 1px solid #d9e0ea; border-radius: 8px;\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/6.png\" alt=\"online training courses for python\" width=\"850\" height=\"553\" \/><\/div>\n<h3 style=\"font-family: Arial,Helvetica,sans-serif; font-size: 21px; line-height: 1.35; font-weight: bold; color: #0f2a4a; margin: 28px 0 10px;\">Step 6: Open the Environment Variables Window<\/h3>\n<p style=\"font-family: Arial,Helvetica,sans-serif; font-size: 17px; line-height: 1.7; color: #1f2937; margin: 0 0 16px;\">To add Python to the PATH by hand, open the Windows search box, type environment variables, and choose Edit the system environment variables. In the window that opens, click the Environment Variables button.<\/p>\n<div style=\"margin: 16px 0 24px;\"><img loading=\"lazy\" decoding=\"async\" style=\"display: block; max-width: 100%; height: auto; border: 1px solid #d9e0ea; border-radius: 8px;\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/7.png\" alt=\"python training institute in BTM layout\" width=\"850\" height=\"920\" \/><\/div>\n<div style=\"margin: 16px 0 24px;\"><img loading=\"lazy\" decoding=\"async\" style=\"display: block; max-width: 100%; height: auto; border: 1px solid #d9e0ea; border-radius: 8px;\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/8.png\" alt=\"python training in btm\" width=\"850\" height=\"877\" \/><\/div>\n<h3 style=\"font-family: Arial,Helvetica,sans-serif; font-size: 21px; line-height: 1.35; font-weight: bold; color: #0f2a4a; margin: 28px 0 10px;\">Step 7: Edit the Path Variable<\/h3>\n<p style=\"font-family: Arial,Helvetica,sans-serif; font-size: 17px; line-height: 1.7; color: #1f2937; margin: 0 0 16px;\">In the top part of the window, called User variables, look for a variable named Path. It almost always exists already. Select it and click Edit. Do not make a new variable named PATH. Adding a new one can hide or break the old one. Instead, add new lines to the existing list.<\/p>\n<div style=\"margin: 16px 0 24px;\"><img loading=\"lazy\" decoding=\"async\" style=\"display: block; max-width: 100%; height: auto; border: 1px solid #d9e0ea; border-radius: 8px;\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/9.png\" alt=\"python training in btm Layout\" width=\"850\" height=\"989\" \/><\/div>\n<h3 style=\"font-family: Arial,Helvetica,sans-serif; font-size: 21px; line-height: 1.35; font-weight: bold; color: #0f2a4a; margin: 28px 0 10px;\">Step 8: Add the Python Folders<\/h3>\n<p style=\"font-family: Arial,Helvetica,sans-serif; font-size: 17px; line-height: 1.7; color: #1f2937; margin: 0 0 16px;\">Click New, and add the folder where Python is installed. Click New again, and add its Scripts folder, which holds tools such as pip. With the Install Now option, the folders are usually inside your user folder, in AppData, Local, Programs, Python. The exact name depends on your version, so the safest way is to look for yourself in File Explorer, find the folder that holds <code style=\"font-family: 'Courier New',Courier,monospace; font-size: 15px; background: #eef2f7; padding: 2px 6px; border-radius: 4px;\">python.exe<\/code>, and copy its address from the address bar. Then click OK on every window.<\/p>\n<div style=\"margin: 20px 0; border: 1px solid #d9e0ea; border-radius: 8px; overflow: hidden;\">\n<div style=\"background: #0f2a4a; color: #ffffff; font-family: Arial,Helvetica,sans-serif; font-size: 14px; font-weight: bold; padding: 8px 16px;\">example folders<\/div>\n<pre style=\"margin: 0; padding: 16px; color: #1f2937; font-family: 'Courier New',Courier,monospace; font-size: 14px; line-height: 1.7; overflow-x: auto; white-space: pre; background: #f5f8fc;\">C:\\Users\\YourName\\AppData\\Local\\Programs\\Python\\Python315\r\nC:\\Users\\YourName\\AppData\\Local\\Programs\\Python\\Python315\\Scripts<\/pre>\n<\/div>\n<p style=\"font-family: Arial,Helvetica,sans-serif; font-size: 17px; line-height: 1.7; color: #1f2937; margin: 0 0 16px;\">These are examples. Replace YourName and the version number with your own.<\/p>\n<div style=\"margin: 16px 0 24px;\"><img loading=\"lazy\" decoding=\"async\" style=\"display: block; max-width: 100%; height: auto; border: 1px solid #d9e0ea; border-radius: 8px;\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/10.png\" alt=\"Best Python Training in BTM Layout\" width=\"850\" height=\"978\" \/><\/div>\n<h3 style=\"font-family: Arial,Helvetica,sans-serif; font-size: 21px; line-height: 1.35; font-weight: bold; color: #0f2a4a; margin: 28px 0 10px;\">Step 9: Restart the Command Prompt and Test<\/h3>\n<p style=\"font-family: Arial,Helvetica,sans-serif; font-size: 17px; line-height: 1.7; color: #1f2937; margin: 0 0 16px;\">Close every Command Prompt window, and open a new one. An already open window does not see the change. Then run:<\/p>\n<div style=\"margin: 20px 0; border: 1px solid #d9e0ea; border-radius: 8px; overflow: hidden;\">\n<div style=\"background: #0f2a4a; color: #ffffff; font-family: Arial,Helvetica,sans-serif; font-size: 14px; font-weight: bold; padding: 8px 16px;\">terminal<\/div>\n<pre style=\"margin: 0; padding: 16px; color: #1f2937; font-family: 'Courier New',Courier,monospace; font-size: 14px; line-height: 1.7; overflow-x: auto; white-space: pre; background: #f5f8fc;\">python --version\r\npy --version<\/pre>\n<\/div>\n<p style=\"font-family: Arial,Helvetica,sans-serif; font-size: 17px; line-height: 1.7; color: #1f2937; margin: 0 0 16px;\">Both should show the version. The second one uses the py launcher, which is installed with Python and works even when PATH is not set. If you type <code style=\"font-family: 'Courier New',Courier,monospace; font-size: 15px; background: #eef2f7; padding: 2px 6px; border-radius: 4px;\">python<\/code> and it opens the Microsoft Store, that is a Windows shortcut, and not Python. Use <code style=\"font-family: 'Courier New',Courier,monospace; font-size: 15px; background: #eef2f7; padding: 2px 6px; border-radius: 4px;\">py<\/code> instead, or turn off the shortcut in the Windows settings for app execution aliases.<\/p>\n<div style=\"margin: 16px 0 24px;\"><img loading=\"lazy\" decoding=\"async\" style=\"display: block; max-width: 100%; height: auto; border: 1px solid #d9e0ea; border-radius: 8px;\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/11.png\" alt=\"Python Certification Course in Bangalore\" width=\"850\" height=\"197\" \/><\/div>\n<h2 style=\"font-family: Arial,Helvetica,sans-serif; font-size: 26px; line-height: 1.3; font-weight: bold; color: #0f2a4a; margin: 36px 0 12px;\">How to Install Python on Mac<\/h2>\n<p style=\"font-family: Arial,Helvetica,sans-serif; font-size: 17px; line-height: 1.7; color: #1f2937; margin: 0 0 16px;\">Newer Macs come with a Python 3 that Apple uses for its own tools. The official docs say to never change or delete that copy. Install your own from python.org, and the two live side by side.<\/p>\n<ol style=\"font-family: Arial,Helvetica,sans-serif; font-size: 17px; line-height: 1.7; color: #1f2937; margin: 0 0 16px; padding-left: 28px;\">\n<li style=\"margin: 0 0 8px;\">Open the macOS downloads page on python.org, and download the latest installer, a file that ends in <code style=\"font-family: 'Courier New',Courier,monospace; font-size: 15px; background: #eef2f7; padding: 2px 6px; border-radius: 4px;\">.pkg<\/code>. One installer works on both Intel and Apple Silicon Macs.<\/li>\n<li style=\"margin: 0 0 8px;\">Double click the file and follow the steps. You need an administrator account on the Mac.<\/li>\n<li style=\"margin: 0 0 8px;\">When it ends, open the Python folder inside Applications. Double click <code style=\"font-family: 'Courier New',Courier,monospace; font-size: 15px; background: #eef2f7; padding: 2px 6px; border-radius: 4px;\">Install Certificates.command<\/code>. This opens a Terminal window and installs the certificates Python needs to download things safely. Wait for the message that says it is complete. Many guides skip this step, and it is the reason for the common SSL error that readers hit later.<\/li>\n<li style=\"margin: 0 0 8px;\">Open Terminal, and type the command below. The command on a Mac is <code style=\"font-family: 'Courier New',Courier,monospace; font-size: 15px; background: #eef2f7; padding: 2px 6px; border-radius: 4px;\">python3<\/code>, not <code style=\"font-family: 'Courier New',Courier,monospace; font-size: 15px; background: #eef2f7; padding: 2px 6px; border-radius: 4px;\">python<\/code>.<\/li>\n<\/ol>\n<div style=\"margin: 20px 0; border: 1px solid #d9e0ea; border-radius: 8px; overflow: hidden;\">\n<div style=\"background: #0f2a4a; color: #ffffff; font-family: Arial,Helvetica,sans-serif; font-size: 14px; font-weight: bold; padding: 8px 16px;\">terminal<\/div>\n<pre style=\"margin: 0; padding: 16px; color: #1f2937; font-family: 'Courier New',Courier,monospace; font-size: 14px; line-height: 1.7; overflow-x: auto; white-space: pre; background: #f5f8fc;\">python3 --version<\/pre>\n<div style=\"background: #1f2937; color: #ffffff; font-family: Arial,Helvetica,sans-serif; font-size: 14px; font-weight: bold; padding: 8px 16px;\">output<\/div>\n<pre style=\"margin: 0; padding: 16px; color: #1f2937; font-family: 'Courier New',Courier,monospace; font-size: 14px; line-height: 1.7; overflow-x: auto; white-space: pre; background: #ffffff;\">Python 3.15.0<\/pre>\n<\/div>\n<p style=\"font-family: Arial,Helvetica,sans-serif; font-size: 17px; line-height: 1.7; color: #1f2937; margin: 0 0 16px;\">Homebrew is another way to install Python on a Mac, using the command <code style=\"font-family: 'Courier New',Courier,monospace; font-size: 15px; background: #eef2f7; padding: 2px 6px; border-radius: 4px;\">brew install python<\/code>. It is not maintained by the Python team, so the python.org installer is the safest choice for a beginner. The python.org page also warns that IDLE and some other programs that use Tk windows can hang on a very new macOS release, so read the notes on the download page.<\/p>\n<h2 style=\"font-family: Arial,Helvetica,sans-serif; font-size: 26px; line-height: 1.3; font-weight: bold; color: #0f2a4a; margin: 36px 0 12px;\">How to Install Python on Ubuntu<\/h2>\n<p style=\"font-family: Arial,Helvetica,sans-serif; font-size: 17px; line-height: 1.7; color: #1f2937; margin: 0 0 16px;\">Ubuntu already includes Python 3, so first check what you have.<\/p>\n<div style=\"margin: 20px 0; border: 1px solid #d9e0ea; border-radius: 8px; overflow: hidden;\">\n<div style=\"background: #0f2a4a; color: #ffffff; font-family: Arial,Helvetica,sans-serif; font-size: 14px; font-weight: bold; padding: 8px 16px;\">terminal<\/div>\n<pre style=\"margin: 0; padding: 16px; color: #1f2937; font-family: 'Courier New',Courier,monospace; font-size: 14px; line-height: 1.7; overflow-x: auto; white-space: pre; background: #f5f8fc;\">python3 --version<\/pre>\n<\/div>\n<p style=\"font-family: Arial,Helvetica,sans-serif; font-size: 17px; line-height: 1.7; color: #1f2937; margin: 0 0 16px;\">If you see a version, Python is installed. Ubuntu 24.04 ships Python 3.12. To install Python and the two helper packages you will need, run the commands below. The first line refreshes the package list, and the second installs Python, pip for packages, and venv for virtual environments.<\/p>\n<div style=\"margin: 20px 0; border: 1px solid #d9e0ea; border-radius: 8px; overflow: hidden;\">\n<div style=\"background: #0f2a4a; color: #ffffff; font-family: Arial,Helvetica,sans-serif; font-size: 14px; font-weight: bold; padding: 8px 16px;\">terminal<\/div>\n<pre style=\"margin: 0; padding: 16px; color: #1f2937; font-family: 'Courier New',Courier,monospace; font-size: 14px; line-height: 1.7; overflow-x: auto; white-space: pre; background: #f5f8fc;\">sudo apt update\r\nsudo apt install python3 python3-pip python3-venv<\/pre>\n<\/div>\n<p style=\"font-family: Arial,Helvetica,sans-serif; font-size: 17px; line-height: 1.7; color: #1f2937; margin: 0 0 16px;\">On Ubuntu, the command is <code style=\"font-family: 'Courier New',Courier,monospace; font-size: 15px; background: #eef2f7; padding: 2px 6px; border-radius: 4px;\">python3<\/code>. If you type only <code style=\"font-family: 'Courier New',Courier,monospace; font-size: 15px; background: #eef2f7; padding: 2px 6px; border-radius: 4px;\">python<\/code>, you may see a command not found message, because Ubuntu does not add that name by default.<\/p>\n<h3 style=\"font-family: Arial,Helvetica,sans-serif; font-size: 21px; line-height: 1.35; font-weight: bold; color: #0f2a4a; margin: 28px 0 10px;\">Need a Newer Version on Ubuntu?<\/h3>\n<p style=\"font-family: Arial,Helvetica,sans-serif; font-size: 17px; line-height: 1.7; color: #1f2937; margin: 0 0 16px;\">The version in Ubuntu is usually older than the newest release. A common way to get a newer one is the deadsnakes repository, which is run by volunteers and is not an official Python source, so check that you are comfortable with it. Another way is to build Python from the source code, in which case you must run <code style=\"font-family: 'Courier New',Courier,monospace; font-size: 15px; background: #eef2f7; padding: 2px 6px; border-radius: 4px;\">make altinstall<\/code> and not <code style=\"font-family: 'Courier New',Courier,monospace; font-size: 15px; background: #eef2f7; padding: 2px 6px; border-radius: 4px;\">make install<\/code>. The second command can overwrite the Python that Ubuntu uses for its own tools, and break things.<\/p>\n<div style=\"margin: 20px 0; border: 1px solid #d9e0ea; border-radius: 8px; overflow: hidden;\">\n<div style=\"background: #0f2a4a; color: #ffffff; font-family: Arial,Helvetica,sans-serif; font-size: 14px; font-weight: bold; padding: 8px 16px;\">terminal<\/div>\n<pre style=\"margin: 0; padding: 16px; color: #1f2937; font-family: 'Courier New',Courier,monospace; font-size: 14px; line-height: 1.7; overflow-x: auto; white-space: pre; background: #f5f8fc;\">sudo add-apt-repository ppa:deadsnakes\/ppa\r\nsudo apt update\r\nsudo apt install python3.12 python3.12-venv<\/pre>\n<\/div>\n<p style=\"font-family: Arial,Helvetica,sans-serif; font-size: 17px; line-height: 1.7; color: #1f2937; margin: 0 0 16px;\">Replace 3.12 with the version you want. If the editor named IDLE is missing, install it with <code style=\"font-family: 'Courier New',Courier,monospace; font-size: 15px; background: #eef2f7; padding: 2px 6px; border-radius: 4px;\">sudo apt install idle<\/code>.<\/p>\n<h2 style=\"font-family: Arial,Helvetica,sans-serif; font-size: 26px; line-height: 1.3; font-weight: bold; color: #0f2a4a; margin: 36px 0 12px;\">Run Your First Python Program<\/h2>\n<p style=\"font-family: Arial,Helvetica,sans-serif; font-size: 17px; line-height: 1.7; color: #1f2937; margin: 0 0 16px;\">Installing is only half the job. Prove that it works by running a program. Open any text editor, type the program below, and save it as <code style=\"font-family: 'Courier New',Courier,monospace; font-size: 15px; background: #eef2f7; padding: 2px 6px; border-radius: 4px;\">hello.py<\/code>.<\/p>\n<div style=\"margin: 20px 0; border: 1px solid #d9e0ea; border-radius: 8px; overflow: hidden;\">\n<div style=\"background: #0f2a4a; color: #ffffff; font-family: Arial,Helvetica,sans-serif; font-size: 14px; font-weight: bold; padding: 8px 16px;\">python<\/div>\n<pre style=\"margin: 0; padding: 16px; color: #1f2937; font-family: 'Courier New',Courier,monospace; font-size: 14px; line-height: 1.7; overflow-x: auto; white-space: pre; background: #f5f8fc;\">print(\"Hello, Python!\")\r\nname = input(\"What is your name? \")\r\nprint(\"Nice to meet you,\", name)\r\nprint(\"2 + 3 =\", 2 + 3)<\/pre>\n<\/div>\n<p style=\"font-family: Arial,Helvetica,sans-serif; font-size: 17px; line-height: 1.7; color: #1f2937; margin: 0 0 16px;\">Open the terminal in the folder where you saved the file. On Windows, use <code style=\"font-family: 'Courier New',Courier,monospace; font-size: 15px; background: #eef2f7; padding: 2px 6px; border-radius: 4px;\">py<\/code> or <code style=\"font-family: 'Courier New',Courier,monospace; font-size: 15px; background: #eef2f7; padding: 2px 6px; border-radius: 4px;\">python<\/code>. On Mac and Ubuntu, use <code style=\"font-family: 'Courier New',Courier,monospace; font-size: 15px; background: #eef2f7; padding: 2px 6px; border-radius: 4px;\">python3<\/code>.<\/p>\n<div style=\"margin: 20px 0; border: 1px solid #d9e0ea; border-radius: 8px; overflow: hidden;\">\n<div style=\"background: #0f2a4a; color: #ffffff; font-family: Arial,Helvetica,sans-serif; font-size: 14px; font-weight: bold; padding: 8px 16px;\">terminal<\/div>\n<pre style=\"margin: 0; padding: 16px; color: #1f2937; font-family: 'Courier New',Courier,monospace; font-size: 14px; line-height: 1.7; overflow-x: auto; white-space: pre; background: #f5f8fc;\">python hello.py<\/pre>\n<div style=\"background: #1f2937; color: #ffffff; font-family: Arial,Helvetica,sans-serif; font-size: 14px; font-weight: bold; padding: 8px 16px;\">output<\/div>\n<pre style=\"margin: 0; padding: 16px; color: #1f2937; font-family: 'Courier New',Courier,monospace; font-size: 14px; line-height: 1.7; overflow-x: auto; white-space: pre; background: #ffffff;\">Hello, Python!\r\nWhat is your name? Asha\r\nNice to meet you, Asha\r\n2 + 3 = 5<\/pre>\n<\/div>\n<p style=\"font-family: Arial,Helvetica,sans-serif; font-size: 17px; line-height: 1.7; color: #1f2937; margin: 0 0 16px;\">The name Asha is what we typed at the question. If you see your own name in the last lines, Python is working.<\/p>\n<h3 style=\"font-family: Arial,Helvetica,sans-serif; font-size: 21px; line-height: 1.35; font-weight: bold; color: #0f2a4a; margin: 28px 0 10px;\">The Interactive Shell<\/h3>\n<p style=\"font-family: Arial,Helvetica,sans-serif; font-size: 17px; line-height: 1.7; color: #1f2937; margin: 0 0 16px;\">You can also type Python commands one at a time. Type <code style=\"font-family: 'Courier New',Courier,monospace; font-size: 15px; background: #eef2f7; padding: 2px 6px; border-radius: 4px;\">python<\/code> (or <code style=\"font-family: 'Courier New',Courier,monospace; font-size: 15px; background: #eef2f7; padding: 2px 6px; border-radius: 4px;\">python3<\/code>), and press Enter. You will see a prompt with three arrow signs. Type a line and press Enter, and Python answers at once. To leave, type <code style=\"font-family: 'Courier New',Courier,monospace; font-size: 15px; background: #eef2f7; padding: 2px 6px; border-radius: 4px;\">exit()<\/code> and press Enter.<\/p>\n<h3 style=\"font-family: Arial,Helvetica,sans-serif; font-size: 21px; line-height: 1.35; font-weight: bold; color: #0f2a4a; margin: 28px 0 10px;\">IDLE<\/h3>\n<p style=\"font-family: Arial,Helvetica,sans-serif; font-size: 17px; line-height: 1.7; color: #1f2937; margin: 0 0 16px;\">IDLE is a simple editor that comes with Python on Windows and Mac. Search for it in the Start menu, or open it from the Python folder in Applications. It is enough for your first scripts. Later, try a full editor, such as VS Code or PyCharm.<\/p>\n<h2 style=\"font-family: Arial,Helvetica,sans-serif; font-size: 26px; line-height: 1.3; font-weight: bold; color: #0f2a4a; margin: 36px 0 12px;\">Create a Virtual Environment<\/h2>\n<p style=\"font-family: Arial,Helvetica,sans-serif; font-size: 17px; line-height: 1.7; color: #1f2937; margin: 0 0 16px;\">A virtual environment is a private copy of Python for one project, so the packages for one project do not clash with another. It is a good habit from day one. These commands create one, turn it on, and check that it is active. The check printed True when we ran it.<\/p>\n<div style=\"margin: 20px 0; border: 1px solid #d9e0ea; border-radius: 8px; overflow: hidden;\">\n<div style=\"background: #0f2a4a; color: #ffffff; font-family: Arial,Helvetica,sans-serif; font-size: 14px; font-weight: bold; padding: 8px 16px;\">terminal<\/div>\n<pre style=\"margin: 0; padding: 16px; color: #1f2937; font-family: 'Courier New',Courier,monospace; font-size: 14px; line-height: 1.7; overflow-x: auto; white-space: pre; background: #f5f8fc;\">python3 -m venv myenv\r\nsource myenv\/bin\/activate\r\npython -c \"import sys; print(sys.prefix != sys.base_prefix)\"<\/pre>\n<div style=\"background: #1f2937; color: #ffffff; font-family: Arial,Helvetica,sans-serif; font-size: 14px; font-weight: bold; padding: 8px 16px;\">output<\/div>\n<pre style=\"margin: 0; padding: 16px; color: #1f2937; font-family: 'Courier New',Courier,monospace; font-size: 14px; line-height: 1.7; overflow-x: auto; white-space: pre; background: #ffffff;\">True<\/pre>\n<\/div>\n<p style=\"font-family: Arial,Helvetica,sans-serif; font-size: 17px; line-height: 1.7; color: #1f2937; margin: 0 0 16px;\">On Windows, the same idea uses two different lines, with <code style=\"font-family: 'Courier New',Courier,monospace; font-size: 15px; background: #eef2f7; padding: 2px 6px; border-radius: 4px;\">py<\/code> in place of <code style=\"font-family: 'Courier New',Courier,monospace; font-size: 15px; background: #eef2f7; padding: 2px 6px; border-radius: 4px;\">python3<\/code>, and with the activate script in the Scripts folder.<\/p>\n<div style=\"margin: 20px 0; border: 1px solid #d9e0ea; border-radius: 8px; overflow: hidden;\">\n<div style=\"background: #0f2a4a; color: #ffffff; font-family: Arial,Helvetica,sans-serif; font-size: 14px; font-weight: bold; padding: 8px 16px;\">terminal (Windows)<\/div>\n<pre style=\"margin: 0; padding: 16px; color: #1f2937; font-family: 'Courier New',Courier,monospace; font-size: 14px; line-height: 1.7; overflow-x: auto; white-space: pre; background: #f5f8fc;\">py -m venv myenv\r\nmyenv\\Scripts\\activate<\/pre>\n<\/div>\n<p style=\"font-family: Arial,Helvetica,sans-serif; font-size: 17px; line-height: 1.7; color: #1f2937; margin: 0 0 16px;\">When the environment is active, its name appears at the start of your prompt. Type <code style=\"font-family: 'Courier New',Courier,monospace; font-size: 15px; background: #eef2f7; padding: 2px 6px; border-radius: 4px;\">deactivate<\/code> to leave it.<\/p>\n<h2 style=\"font-family: Arial,Helvetica,sans-serif; font-size: 26px; line-height: 1.3; font-weight: bold; color: #0f2a4a; margin: 36px 0 12px;\">Common Problems and Fixes<\/h2>\n<div style=\"border: 1px solid #d9e0ea; border-radius: 8px; overflow-x: auto; margin: 20px 0; -webkit-overflow-scrolling: touch;\">\n<table style=\"width: 100%; min-width: 700px; border-collapse: collapse; font-family: Arial,Helvetica,sans-serif; font-size: 16px; line-height: 1.6; color: #1f2937;\">\n<caption style=\"caption-side: top; text-align: left; padding: 14px 16px; font-weight: bold; font-size: 17px; color: #0f2a4a;\">Python installation problems and fixes<\/caption>\n<thead>\n<tr>\n<th style=\"background: #0f2a4a; color: #ffffff; text-align: left; padding: 12px 16px; border-bottom: 2px solid #0b1f38; width: 280px;\" scope=\"col\">Problem<\/th>\n<th style=\"background: #0f2a4a; color: #ffffff; text-align: left; padding: 12px 16px; border-bottom: 2px solid #0b1f38;\" scope=\"col\">What to try<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"background: #ffffff;\">\n<th style=\"text-align: left; padding: 12px 16px; border-bottom: 1px solid #e5e9f0; color: #0f2a4a; vertical-align: top;\" scope=\"row\">python is not recognized as an internal or external command<\/th>\n<td style=\"padding: 12px 16px; border-bottom: 1px solid #e5e9f0;\">PATH is not set. Reinstall with the PATH box ticked, or add the folders by hand as in steps 6 to 8. Then open a new Command Prompt<\/td>\n<\/tr>\n<tr style=\"background: #f5f8fc;\">\n<th style=\"text-align: left; padding: 12px 16px; border-bottom: 1px solid #e5e9f0; color: #0f2a4a; vertical-align: top;\" scope=\"row\">Typing python opens the Microsoft Store<\/th>\n<td style=\"padding: 12px 16px; border-bottom: 1px solid #e5e9f0;\">Python is not installed, or the Store shortcut comes first. Install Python, or use the py command<\/td>\n<\/tr>\n<tr style=\"background: #ffffff;\">\n<th style=\"text-align: left; padding: 12px 16px; border-bottom: 1px solid #e5e9f0; color: #0f2a4a; vertical-align: top;\" scope=\"row\">python3: command not found on Windows<\/th>\n<td style=\"padding: 12px 16px; border-bottom: 1px solid #e5e9f0;\">On Windows the command is python or py. The name python3 is for Mac and Linux<\/td>\n<\/tr>\n<tr style=\"background: #f5f8fc;\">\n<th style=\"text-align: left; padding: 12px 16px; border-bottom: 1px solid #e5e9f0; color: #0f2a4a; vertical-align: top;\" scope=\"row\">python: command not found on Ubuntu<\/th>\n<td style=\"padding: 12px 16px; border-bottom: 1px solid #e5e9f0;\">Use python3, or install the package named python-is-python3<\/td>\n<\/tr>\n<tr style=\"background: #ffffff;\">\n<th style=\"text-align: left; padding: 12px 16px; border-bottom: 1px solid #e5e9f0; color: #0f2a4a; vertical-align: top;\" scope=\"row\">The version is not the one I installed<\/th>\n<td style=\"padding: 12px 16px; border-bottom: 1px solid #e5e9f0;\">Another Python comes earlier in the PATH, or on Mac you are using the Apple copy. Check with where python on Windows, or which python3 on Mac and Ubuntu<\/td>\n<\/tr>\n<tr style=\"background: #f5f8fc;\">\n<th style=\"text-align: left; padding: 12px 16px; border-bottom: 1px solid #e5e9f0; color: #0f2a4a; vertical-align: top;\" scope=\"row\">pip is not recognized<\/th>\n<td style=\"padding: 12px 16px; border-bottom: 1px solid #e5e9f0;\">Run it through Python instead, with python -m pip install package_name<\/td>\n<\/tr>\n<tr style=\"background: #ffffff;\">\n<th style=\"text-align: left; padding: 12px 16px; border-bottom: 1px solid #e5e9f0; color: #0f2a4a; vertical-align: top;\" scope=\"row\">An SSL certificate error on Mac<\/th>\n<td style=\"padding: 12px 16px; border-bottom: 1px solid #e5e9f0;\">Run Install Certificates.command in the Python folder in Applications<\/td>\n<\/tr>\n<tr style=\"background: #f5f8fc;\">\n<th style=\"text-align: left; padding: 12px 16px; color: #0f2a4a; vertical-align: top;\" scope=\"row\">The installer fails on an old Windows<\/th>\n<td style=\"padding: 12px 16px;\">Python 3.15 needs Windows 10 or newer. Use Python 3.12 on Windows 8.1, or Python 3.8 on Windows 7<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h2 style=\"font-family: Arial,Helvetica,sans-serif; font-size: 26px; line-height: 1.3; font-weight: bold; color: #0f2a4a; margin: 36px 0 12px;\">Common Mistakes When Installing Python<\/h2>\n<ul style=\"font-family: Arial,Helvetica,sans-serif; font-size: 17px; line-height: 1.7; color: #1f2937; margin: 0 0 16px; padding-left: 24px;\">\n<li style=\"margin: 0 0 8px;\"><strong>Not ticking the PATH box.<\/strong> It is the cause of most installation problems on Windows.<\/li>\n<li style=\"margin: 0 0 8px;\"><strong>Installing an old version.<\/strong> Python 3.6 and 3.7 are no longer supported.<\/li>\n<li style=\"margin: 0 0 8px;\"><strong>Making a new PATH variable.<\/strong> Edit the Path that exists, and add lines to it.<\/li>\n<li style=\"margin: 0 0 8px;\"><strong>Testing in an old window.<\/strong> Close the Command Prompt and open a new one after changing the PATH.<\/li>\n<li style=\"margin: 0 0 8px;\"><strong>Deleting or changing Apple&#8217;s Python on a Mac.<\/strong> Install your own, and leave Apple&#8217;s alone.<\/li>\n<li style=\"margin: 0 0 8px;\"><strong>Using make install on Ubuntu.<\/strong> Use make altinstall when building from source.<\/li>\n<li style=\"margin: 0 0 8px;\"><strong>Installing packages without a virtual environment.<\/strong> Make one for every project.<\/li>\n<\/ul>\n<h2 style=\"font-family: Arial,Helvetica,sans-serif; font-size: 26px; line-height: 1.3; font-weight: bold; color: #0f2a4a; margin: 36px 0 12px;\">Python Tutorial for Beginners<\/h2>\n<p style=\"font-family: Arial,Helvetica,sans-serif; font-size: 17px; line-height: 1.7; color: #1f2937; margin: 0 0 16px;\">Once Python is installed and running, the best next step is to write real code. A video can help you see the whole flow.<\/p>\n<div style=\"position: relative; width: 100%; max-width: 560px; margin: 20px auto; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: 8px;\"><iframe style=\"position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0;\" title=\"Python tutorial for beginners\" src=\"https:\/\/www.youtube.com\/embed\/QjYfZk6IQCc\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/div>\n<p>Installing Python comes down to three things: take a current version, make sure the system can find it, and run a small program to prove it. Tick the PATH box on Windows, run the certificates step on a Mac, and use python3 on Ubuntu. Once the four lines of output from hello.py appear, you are ready to start learning. Next, set up an editor such as PyCharm, and move on to Python variables and data types.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to Install and Run Python on Windows, Mac and Ubuntu Every Python programmer starts in the same place: a fresh computer with no Python on it, and a download page with more buttons than you expected. The install is easy, but one small step, ticking a single box on Windows, decides whether the next [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3305,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[28,1670],"tags":[497,378,538,544,377,66,545],"class_list":["post-1573","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python","category-python-introduction","tag-how-to-install-and-run-python-on-windows","tag-how-to-install-python-3-7-on-windows","tag-online-python-course","tag-online-python-course-with-certificate","tag-python-installation-guide","tag-python-installation-on-windows","tag-python-training-course-online"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Install and Run Python on Windows, Mac and Ubuntu<\/title>\n<meta name=\"description\" content=\"Install Python on Windows, Mac and Ubuntu step by step: choose a version, add Python to PATH, run your first program and fix common errors.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/prwatech.in\/blog\/python\/python-introduction\/how-to-install-and-run-python-on-windows\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install and Run Python on Windows, Mac and Ubuntu\" \/>\n<meta property=\"og:description\" content=\"Install Python on Windows, Mac and Ubuntu step by step: choose a version, add Python to PATH, run your first program and fix common errors.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/prwatech.in\/blog\/python\/python-introduction\/how-to-install-and-run-python-on-windows\/\" \/>\n<meta property=\"og:site_name\" content=\"Prwatech\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prwatech.in\/\" \/>\n<meta property=\"article:published_time\" content=\"2026-10-20T12:28:33+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-10-21T10:51:58+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/Python-installation-on-Windows-Ubuntu-and-Mac.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"960\" \/>\n\t<meta property=\"og:image:height\" content=\"550\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Prwatech\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@Eduprwatech\" \/>\n<meta name=\"twitter:site\" content=\"@Eduprwatech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Prwatech\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"13 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/prwatech.in\/blog\/python\/python-introduction\/how-to-install-and-run-python-on-windows\/\",\"url\":\"https:\/\/prwatech.in\/blog\/python\/python-introduction\/how-to-install-and-run-python-on-windows\/\",\"name\":\"How to Install and Run Python on Windows, Mac and Ubuntu\",\"isPartOf\":{\"@id\":\"https:\/\/prwatech.in\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/prwatech.in\/blog\/python\/python-introduction\/how-to-install-and-run-python-on-windows\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/prwatech.in\/blog\/python\/python-introduction\/how-to-install-and-run-python-on-windows\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/Python-installation-on-Windows-Ubuntu-and-Mac.jpg\",\"datePublished\":\"2026-10-20T12:28:33+00:00\",\"dateModified\":\"2026-10-21T10:51:58+00:00\",\"author\":{\"@id\":\"https:\/\/prwatech.in\/blog\/#\/schema\/person\/db90baff7744090b2288bbc98fea87f3\"},\"description\":\"Install Python on Windows, Mac and Ubuntu step by step: choose a version, add Python to PATH, run your first program and fix common errors.\",\"breadcrumb\":{\"@id\":\"https:\/\/prwatech.in\/blog\/python\/python-introduction\/how-to-install-and-run-python-on-windows\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/prwatech.in\/blog\/python\/python-introduction\/how-to-install-and-run-python-on-windows\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/prwatech.in\/blog\/python\/python-introduction\/how-to-install-and-run-python-on-windows\/#primaryimage\",\"url\":\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/Python-installation-on-Windows-Ubuntu-and-Mac.jpg\",\"contentUrl\":\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/Python-installation-on-Windows-Ubuntu-and-Mac.jpg\",\"width\":960,\"height\":550,\"caption\":\"Python installation on Windows, Ubuntu, and Mac\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/prwatech.in\/blog\/python\/python-introduction\/how-to-install-and-run-python-on-windows\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/prwatech.in\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Install and Run Python on Windows\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/prwatech.in\/blog\/#website\",\"url\":\"https:\/\/prwatech.in\/blog\/\",\"name\":\"Prwatech\",\"description\":\"Share Ideas, Start Something Good.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/prwatech.in\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/prwatech.in\/blog\/#\/schema\/person\/db90baff7744090b2288bbc98fea87f3\",\"name\":\"Prwatech\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/prwatech.in\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c00bafc1b04045f31eda917de39891456c44fa47c092b9bb6be0f860a3a30a2f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c00bafc1b04045f31eda917de39891456c44fa47c092b9bb6be0f860a3a30a2f?s=96&d=mm&r=g\",\"caption\":\"Prwatech\"},\"url\":\"https:\/\/prwatech.in\/blog\/author\/prwatech123\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Install and Run Python on Windows, Mac and Ubuntu","description":"Install Python on Windows, Mac and Ubuntu step by step: choose a version, add Python to PATH, run your first program and fix common errors.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/prwatech.in\/blog\/python\/python-introduction\/how-to-install-and-run-python-on-windows\/","og_locale":"en_US","og_type":"article","og_title":"How to Install and Run Python on Windows, Mac and Ubuntu","og_description":"Install Python on Windows, Mac and Ubuntu step by step: choose a version, add Python to PATH, run your first program and fix common errors.","og_url":"https:\/\/prwatech.in\/blog\/python\/python-introduction\/how-to-install-and-run-python-on-windows\/","og_site_name":"Prwatech","article_publisher":"https:\/\/www.facebook.com\/prwatech.in\/","article_published_time":"2026-10-20T12:28:33+00:00","article_modified_time":"2026-10-21T10:51:58+00:00","og_image":[{"width":960,"height":550,"url":"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/Python-installation-on-Windows-Ubuntu-and-Mac.jpg","type":"image\/jpeg"}],"author":"Prwatech","twitter_card":"summary_large_image","twitter_creator":"@Eduprwatech","twitter_site":"@Eduprwatech","twitter_misc":{"Written by":"Prwatech","Est. reading time":"13 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/prwatech.in\/blog\/python\/python-introduction\/how-to-install-and-run-python-on-windows\/","url":"https:\/\/prwatech.in\/blog\/python\/python-introduction\/how-to-install-and-run-python-on-windows\/","name":"How to Install and Run Python on Windows, Mac and Ubuntu","isPartOf":{"@id":"https:\/\/prwatech.in\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/prwatech.in\/blog\/python\/python-introduction\/how-to-install-and-run-python-on-windows\/#primaryimage"},"image":{"@id":"https:\/\/prwatech.in\/blog\/python\/python-introduction\/how-to-install-and-run-python-on-windows\/#primaryimage"},"thumbnailUrl":"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/Python-installation-on-Windows-Ubuntu-and-Mac.jpg","datePublished":"2026-10-20T12:28:33+00:00","dateModified":"2026-10-21T10:51:58+00:00","author":{"@id":"https:\/\/prwatech.in\/blog\/#\/schema\/person\/db90baff7744090b2288bbc98fea87f3"},"description":"Install Python on Windows, Mac and Ubuntu step by step: choose a version, add Python to PATH, run your first program and fix common errors.","breadcrumb":{"@id":"https:\/\/prwatech.in\/blog\/python\/python-introduction\/how-to-install-and-run-python-on-windows\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/prwatech.in\/blog\/python\/python-introduction\/how-to-install-and-run-python-on-windows\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/prwatech.in\/blog\/python\/python-introduction\/how-to-install-and-run-python-on-windows\/#primaryimage","url":"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/Python-installation-on-Windows-Ubuntu-and-Mac.jpg","contentUrl":"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/Python-installation-on-Windows-Ubuntu-and-Mac.jpg","width":960,"height":550,"caption":"Python installation on Windows, Ubuntu, and Mac"},{"@type":"BreadcrumbList","@id":"https:\/\/prwatech.in\/blog\/python\/python-introduction\/how-to-install-and-run-python-on-windows\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/prwatech.in\/blog\/"},{"@type":"ListItem","position":2,"name":"Install and Run Python on Windows"}]},{"@type":"WebSite","@id":"https:\/\/prwatech.in\/blog\/#website","url":"https:\/\/prwatech.in\/blog\/","name":"Prwatech","description":"Share Ideas, Start Something Good.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/prwatech.in\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/prwatech.in\/blog\/#\/schema\/person\/db90baff7744090b2288bbc98fea87f3","name":"Prwatech","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/prwatech.in\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/c00bafc1b04045f31eda917de39891456c44fa47c092b9bb6be0f860a3a30a2f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c00bafc1b04045f31eda917de39891456c44fa47c092b9bb6be0f860a3a30a2f?s=96&d=mm&r=g","caption":"Prwatech"},"url":"https:\/\/prwatech.in\/blog\/author\/prwatech123\/"}]}},"_links":{"self":[{"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/posts\/1573","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/comments?post=1573"}],"version-history":[{"count":19,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/posts\/1573\/revisions"}],"predecessor-version":[{"id":12066,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/posts\/1573\/revisions\/12066"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/media\/3305"}],"wp:attachment":[{"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/media?parent=1573"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/categories?post=1573"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/tags?post=1573"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}