Learning Python from Scratch: Lesson 1 – Environment Setup and Your First Program

This article will guide you step by step through the installation of Python in the simplest way possible. Whether you are using Windows or Mac, you can easily get started.Step 1: Download Python (https://www.python.org/downloads/After entering the official website link—— click the “Download” button For Windows, select Windows for Mac, select MacLearning Python from Scratch: Lesson 1 - Environment Setup and Your First ProgramThis is the Windows download page, select the corresponding Python version, and click Download to installLearning Python from Scratch: Lesson 1 - Environment Setup and Your First ProgramThis is the Mac version download page, select the corresponding Python version, and click Download to installLearning Python from Scratch: Lesson 1 - Environment Setup and Your First Program

Step 2: Install Python (Important!)

For Windows users

1. Make sure to check “Add Python to PATH” (otherwise, the command line will not recognize the python command)2. Select “Customize installation” to customize the installation pathLearning Python from Scratch: Lesson 1 - Environment Setup and Your First ProgramLearning Python from Scratch: Lesson 1 - Environment Setup and Your First ProgramLearning Python from Scratch: Lesson 1 - Environment Setup and Your First ProgramLearning Python from Scratch: Lesson 1 - Environment Setup and Your First ProgramLearning Python from Scratch: Lesson 1 - Environment Setup and Your First ProgramFor Mac users

1.Double-click python.pkg

2.Click continue repeatedly, enter password to authorize until the installation is complete.

3. After installation, without opening anything, just go to install pycharm and you are good to go!

Learning Python from Scratch: Lesson 1 - Environment Setup and Your First ProgramLearning Python from Scratch: Lesson 1 - Environment Setup and Your First ProgramStep 3: Verify if the installation was successful

  • Windows:<span><span>Win + R</span></span> → Enter <span><span>cmd</span></span> → Press Enter
  • Learning Python from Scratch: Lesson 1 - Environment Setup and Your First ProgramLearning Python from Scratch: Lesson 1 - Environment Setup and Your First Program
    • Enter the command:<span><span>python </span></span> or <span><span>python3 </span></span>
  • Learning Python from Scratch: Lesson 1 - Environment Setup and Your First Program

    4. Congratulations, the Python environment has been successfully installed

    You can directly write a line <span>print("Hello Python")</span> and run it

  • Learning Python from Scratch: Lesson 1 - Environment Setup and Your First Program
  • If you find this useful, share it with friends who are learning Python!

Leave a Comment