How to Install Python and Check Your Version on Windows, Mac and Linux
To check your Python version in CMD, open Command Prompt and type python –version or py –version. On Mac or Linux, use python3 –version in Terminal. You will see output like Python 3.13.0. If you get an error, Python is not installed or has not been added to your PATH.
How to Check Python Version in CMD: Quick Steps
- Press Win + R, type cmd and press Enter to open Command Prompt.
- Type python –version or py –version and press Enter.
- Read the output. A result like Python 3.13.0 confirms Python is installed and working.
- If you see ‘python’ is not recognized, Python is not in your PATH. Follow the PATH fix section below.
- Key Takeaway 1: Download Python only from python.org to avoid bundled malware.
- Key Takeaway 2: On Windows, always tick “Add Python to PATH” during installation or you will hit errors every time.
- Key Takeaway 3: Use python3 –version on Mac and Linux; the python command may still point to the legacy Python 2.
- Key Takeaway 4: VS Code with the Python extension is the easiest IDE setup for absolute beginners.
- Key Takeaway 5: Verify pip is working right after install with pip –version before you do anything else.
How to Install Python on Windows, Mac and Linux
Python is consistently ranked the most popular programming language in the world. According to the TIOBE Index (July 2025), Python holds over 22% of the global language popularity share, making it the single most-used language for two consecutive years. For students at Indian universities or anyone switching careers into tech, getting Python installed correctly is step one.
Installing Python on Windows 10 and Windows 11
Go to python.org/downloads and click the big yellow “Download Python 3.x.x” button. Run the installer. Before you click “Install Now,” look at the bottom of the first screen. You will see a small checkbox that says “Add Python to PATH.” Tick it. This is the single most common reason beginners cannot check their Python version in CMD after installation, and it is the easiest fix if you catch it here.
Once the install finishes, open Command Prompt (press Win + R, type cmd, hit Enter). Type python –version or py –version. Either command should print your Python version. If it does, you are done. If you see “‘python’ is not recognized,” scroll down to the PATH section below.
Installing Python on Mac
Macs ship with Python 2.7 pre-installed, but that version reached end-of-life in January 2020 and you should never use it for new projects. To install a modern Python on Mac, the cleanest route is Homebrew. Open Terminal and run /bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)” to install Homebrew first, then run brew install python.
After that, type python3 –version in Terminal to check your Python version. You should see Python 3.13 or higher. The command is python3, not python, because macOS reserves the bare command for its own system tools. Get used to typing python3 on every Mac you work on.
Installing Python on Linux and Ubuntu
Most Linux distributions ship with Python 3 already present. On Ubuntu or Debian-based systems, check your Python version with python3 –version. If it is missing or outdated, run sudo apt update followed by sudo apt install python3. The apt package manager handles the rest.
You will also want pip, Python’s package installer. On Ubuntu, install it separately with sudo apt install python3-pip, then confirm with pip3 –version. On Windows and Mac, pip ships inside the standard Python installer automatically.
How to Check Your Python Version and Add Python to PATH
How to Check Python Version on Windows 10, Mac and Linux
The python version command differs slightly by platform. Knowing all three saves you debugging time when you switch machines. Use the table below as a quick reference.
| Platform | Python Version Command | Expected Output Example |
|---|---|---|
| Windows CMD or PowerShell | python –version or py –version | Python 3.13.0 |
| macOS Terminal | python3 –version | Python 3.13.0 |
| Linux / Ubuntu Terminal | python3 –version | Python 3.11.9 |
| Any platform (check pip) | pip –version or pip3 –version | pip 24.1 from /usr/local/lib/… |
What to Do When Python Is Not Recognized in CMD
If python –version returns an error in CMD, Python is not in your PATH. Open the Windows search bar and type Environment Variables. Click “Edit the system environment variables,” then click the “Environment Variables” button. Under “System variables,” find Path and click Edit.
Click “New” and add the path to your Python installation folder, typically something like C:\Users\YourName\AppData\Local\Programs\Python\Python313\. Add a second entry for the Scripts subfolder: C:\Users\YourName\AppData\Local\Programs\Python\Python313\Scripts\. Click OK, close CMD, reopen it, and run python –version again. It will work.
How to Update Your Python Version
On Windows, download the latest installer from python.org and run it. It installs alongside your old version without deleting it. On Mac with Homebrew, run brew upgrade python. On Ubuntu, run sudo apt update and then sudo apt upgrade python3.
According to the Python Software Foundation release notes for Python 3.12, version 3.12 introduced a 25% average speed improvement over Python 3.11 in standard benchmarks. Staying current is not just about new features; it is about performance and security patches. If you are working on any project that touches data science or machine learning, running an outdated minor version can create compatibility headaches with newer library releases.
Python 3.13 was released in October 2024 and is now the stable production release. If you are starting fresh today, install 3.13 and check your Python version in CMD after setup to confirm. Check the 3.0 University blog for updates on language changes that matter to beginners.
Choosing the Right IDE and Setting Up VS Code
Which IDE Is Best for Python Beginners?
The short answer: VS Code for most beginners, PyCharm Community Edition if you are going deep into backend development, and IDLE only if you are on a very old or low-spec machine. According to the Stack Overflow Developer Survey 2024, VS Code was used by 73.6% of professional developers, making it the most popular editor by a large margin.
Anaconda is worth mentioning separately. It is not just an IDE; it is a full Python distribution bundled with data science libraries like NumPy, pandas and Jupyter. If your goal is data science or AI, Anaconda saves you hours of library setup. If you are learning general programming or web development, plain Python from python.org plus VS Code is lighter and faster to get running.
Setting Up VS Code for Python
Download VS Code from code.visualstudio.com. Open it, go to the Extensions sidebar (Ctrl+Shift+X), and search for “Python.” Install the Microsoft Python extension. That single extension gives you syntax highlighting, IntelliSense autocomplete, linting and debugging in one click.
Open any .py file and look at the bottom-left status bar. You will see the Python interpreter version displayed there. Click it to switch between Python versions if you have more than one installed. This is the “Select Interpreter” step that trips up beginners who installed Python but VS Code still says it cannot find it. If you need to check your Python version in CMD separately, type python –version to cross-reference what VS Code is detecting.
PyCharm and IDLE as Alternatives
PyCharm Community Edition is free and excellent for larger projects. It handles virtual environments automatically, which is a genuine time-saver once you are working on multiple projects. IDLE comes bundled with every Python installation and needs zero setup, so it is fine for running your first five scripts. After that, move to VS Code or PyCharm.
If you are serious about building a career in tech, your IDE choice matters less than your consistency. Pick one, stick with it for three months. For hands-on structured learning, the bootcamp training programs at 3.0 University are designed around real tools that employers actually use.
What Comes After Installation?
Once Python is installed and you can run python –version in CMD without errors, your next moves are: write and run your first script, learn how pip installs packages, and set up a virtual environment with python -m venv env. These three steps take about 30 minutes and they separate developers who actually build things from those who only read tutorials.
Python skills are increasingly expected even in non-developer roles. According to the NASSCOM Future of Work 2024 report, Python is listed as a required or preferred skill in over 60% of Indian IT job postings across data, automation and cloud roles. For students at IITs, NITs and private engineering colleges across India, learning to install Python and check your Python version in CMD is now a baseline expectation before the first semester of any computer science elective. Learning it now is a practical career move, not just a hobby. If you want to understand how Python fits into the bigger picture, read our guide on how to future-proof your career in the age of AI.
Students in India using the GitHub Education program also get access to free tools and cloud credits that pair well with a fresh Python setup. And if you want to learn alongside other beginners and get feedback from practitioners, the REACH learner community at 3.0 University is a good place to start.
Python is the entry point into cybersecurity scripting, AI model building, web development and data analysis. Getting your environment set up correctly today means you spend tomorrow actually writing code. Explore the online certification courses at 3.0 University in Cybersecurity, Ethical Hacking, Artificial Intelligence, Blockchain and Web3 to build practical, industry-ready skills through hands-on labs and real-world projects that go well beyond the basics.
Frequently Asked Questions
How do I check my Python version in CMD?
Open Command Prompt on Windows and type python –version or py –version. The terminal will print the installed version, such as Python 3.13.0. On Mac and Linux, open Terminal and type python3 –version instead. If you get a “not recognized” error, Python is not in your PATH variable yet.
How do I install Python on Windows?
Go to python.org, download the latest Windows installer, and run it. On the first screen, tick the checkbox that says “Add Python to PATH” before clicking Install Now. Once installation completes, open CMD and type python –version to confirm it worked. The whole process takes under five minutes on a standard connection.
How do I add Python to PATH on Windows?
Search for “Environment Variables” in Windows, open System Properties, click Environment Variables, find the Path variable under System variables, and add the folder path where Python is installed, typically inside AppData\Local\Programs\Python. Also add the Scripts subfolder so pip commands work. Restart CMD after saving the changes.
How do I update my Python version?
On Windows, download the newer installer from python.org and run it. On Mac with Homebrew, run brew upgrade python in Terminal. On Ubuntu, run sudo apt update then sudo apt upgrade python3. After upgrading, confirm the change with python –version or python3 –version depending on your platform.
Which IDE is best for Python beginners?
VS Code is the best starting point for most beginners. It is free, lightweight and the Microsoft Python extension adds everything you need in one install. PyCharm Community Edition is better for larger projects. IDLE works for your first few scripts but lacks modern features. Anaconda suits data science beginners who need pre-loaded scientific libraries from day one.
Why does python –version not work in CMD on Windows 10?
This error means Python is not added to your system PATH. Either you missed the “Add Python to PATH” checkbox during installation, or you need to add the Python folder manually through Environment Variables in Windows Settings. Once the correct folder path is added and CMD is restarted, the python –version command will work correctly.
Last updated: July 2025. Reviewed by the 3University editorial team.


