Welcome to the Python tutorial series on CodeTutHub! Today we'll guide you through the process of installing Python on your computer. This is the first essential step towards learning Python programming.

Step 1: Download Python

Step 2: Install Python

Windows

  1. Double-click the downloaded .exe file.
  2. Check the box that says "Add Python to PATH".
  3. Click on "Install Now".
  4. Wait for the installation process to complete and click "Close".

macOS

  1. Open the downloaded .pkg file.
  2. Follow the installation wizard prompts, typically just clicking "Continue".
  3. Enter your admin password when prompted.
  4. Finish the installation.

Linux

For Debian/Ubuntu:

Open Terminal and run:

shell
sudo apt update
sudo apt install python3 python3-pip

For Fedora:

shell
sudo dnf install python3 python3-pip

Step 3: Verify Installation

To confirm Python is installed correctly:

  • Open Terminal (macOS/Linux) or Command Prompt (Windows).
  • Type the following command:
shell
python --version

or for Python 3 specifically:

shell
python3 --version

You should see the Python version displayed on your screen.

Step 4: Run your first Python script

Create a file named hello.py and type the following:

shell
print("Hello, Python!")

Run this file by executing:

shell
python hello.py

You should see:

shell
Hello, Python!

Conclusion

You have successfully installed Python and run your first Python program. You're now ready to dive deeper into Python programming. Stay tuned to our Python tutorial series at CodeTutHub.com!