What You Will Learn
Beginner
- How to install Python on Windows, macOS, and Linux
- How to verify the installation
- How to use pip (Python package manager)
Install on Windows
Go to python.org/downloads
Download the Windows installer (Python 3.12+)
Run the installer
Check 'Add Python to PATH' (IMPORTANT!)
Click 'Install Now'
Verify: open Command Prompt, run python --version
Install on macOS
Option 1: Download from python.org/downloads
Option 2: Use Homebrew: brew install python
Verify: open Terminal, run python3 --version
Check pip: pip3 --version
Install on Linux (Ubuntu/Debian)
Terminalbash
sudo apt update
sudo apt install python3 python3-pip
python3 --version
pip3 --versionpython vs python3
On macOS and Linux, the command might be python3 instead of python. Use python3 if python does not work.Verifying the Installation
Terminalbash
$ python --version
Python 3.12.2
$ pip --version
pip 24.0Practical Exercise
Download and install Python 3.12+
Verify: python --version (or python3 --version)
Verify pip: pip --version
Run: python -c "print('Installation successful!')"
Key Takeaways
- Download from python.org for Windows/macOS.
- Linux: sudo apt install python3 python3-pip.
- ALWAYS check 'Add Python to PATH' on Windows.
- Verify with: python --version
- pip is the package manager - comes with Python.
Comments
Comments
Post a Comment