Install Python
Install Python
Section titled โInstall PythonโThis page covers the practical minimum: install Python, verify it works, and avoid the most common setup mistakes.
Step 1. Install Python
Section titled โStep 1. Install PythonโDownload Python from the official site:
Choose a current Python 3 release unless your project explicitly requires an older version.
Step 2. Pay Attention During Installation
Section titled โStep 2. Pay Attention During InstallationโWindows
Section titled โWindowsโ- Enable the option to add Python to
PATH. - Install
pipif it is not already selected. - If you are unsure, the default install is usually enough.
- Use the official installer or your preferred package manager.
- Verify which interpreter you are actually using after installation.
Many distributions already include Python, but not always the version you want. Install or update it with your package manager when needed.
Step 3. Verify the Interpreter
Section titled โStep 3. Verify the InterpreterโRun one of these commands:
python --versionor:
python3 --versionThen verify pip:
python -m pip --versionStep 4. Test a Simple Script
Section titled โStep 4. Test a Simple ScriptโCreate a file named hello.py:
print("Hello, Python")Run it:
python hello.pyIf that works, your machine is ready for the next step.
Common Issues
Section titled โCommon Issuesโpython is not recognized
Section titled โpython is not recognizedโThe interpreter is either not installed correctly or is not on PATH.
pip installs to a different Python version
Section titled โpip installs to a different Python versionโUse python -m pip ... so the package manager runs under the interpreter you intend to use.
Multiple Python versions are installed
Section titled โMultiple Python versions are installedโThat is normal. Just be deliberate about which interpreter your project uses.