To get started with Python, let’s first finish the installation steps. Here’s a basic guide to setup Python in your system.
Install Python
Before starting this Python course first, you need to install Python on your computer. To install Python on your computer, follow these steps:
- Download Python: Go to the official Python website at https://www.python.org/. On the homepage, you will see a “Downloads” section. Click on the “Download Python” button.
![Download-Python-01](https://media.geeksforgeeks.org/wp-content/uploads/20241129113512337414/Download-Python-01.webp)
- Choose the Version: You will be directed to a page where you can choose the version of Python you want to download. Python usually has two main versions available: Python 3. Python 3 is the recommended version. Click on the appropriate version for your operating system (Windows, macOS, or Linux).
- Add Python to PATH (Optional): On Windows, you may be given the option to add Python to your system’s PATH environment variable. This makes it easier to run Python from the command line. If you’re not sure, it’s usually safe to select this option.
- Install Python: Click the “Install Now” button to begin the installation. The installer will copy the necessary files to your computer.
- Verify the Installation: After the installation is complete, you can verify if Python was installed correctly by opening cmd (on Windows) or terminal (on macOS or Linux). Type:
python --version
. This should display the version of Python you installed.
![Python-version-02](https://media.geeksforgeeks.org/wp-content/uploads/20241129112049491726/Python-version-02.webp)
Step By Step Installation Guide:
That’s it! Python should now be installed on your computer, and you’re ready to start using Python.
Create and Run your First Python Program on Terminal
Once you have Python installed, you can run the program by following these steps:
- Open a text editor (e.g., Notepad on Windows, TextEdit on macOS, or any code editor like VS Code, PyCharm, etc.).
- Copy the code:- print(‘Hello World’) above and paste it into the text editor.
- Save the file with
.
py
extension (e.g., Hello.py
). - Open the terminal.
- Run the program by pressing Enter.
![Python-Script](https://media.geeksforgeeks.org/wp-content/uploads/20241129115517927172/Python-Script.webp)
You should see the output “Hello World” printed in the terminal.
Congratulations, You have executed your First Python code.
While Learning Python, we will be using Geeksforgeeks code-editor present inside every tutorial, where you can learn and modify the code for practice. Let’s see how to print Printing “Hello World” on online ide.
Looking to dive into the world of programming or sharpen your Python skills? Our Master Python: Complete Beginner to Advanced Course is your ultimate guide to becoming proficient in Python. This course covers everything you need to build a solid foundation from fundamental programming concepts to advanced techniques. With hands-on projects, real-world examples, and expert guidance, you’ll gain the confidence to tackle complex coding challenges. Whether you’re starting from scratch or aiming to enhance your skills, this course is the perfect fit. Enroll now and master Python, the language of the future!