Table of Contents
In this lesson, you will learn how to prepare the environment to start coding in Python. For this course, we will be using the Windows Operating system to run our programs.
Ways to Run your Python Code for this Course
To run python code, you will have to install it on your local computer or use an online compiler.
Option 1: Install Python On windows
1- Download Python from Python.org
Go to https://www.python.org/downloads/ and select the version of Python that you would like to install. It’s recommended to install the latest stable version available.
2- Run the executable installer
Once the download is over, run the executable installer, and make sure the settings are as shown in the picture below, then click on Install Now.Note: Make sure you have administrative privileges before you start the installation process.
Before the installation is over, Python allows you to disable the path length limit, which means Python can use path names that are longer than the default 260 character limit.
3- Verify that Python was Installed Successfully on Windows
Before you move to the next step, make sure that Python was successfully installed on your machine by navigating to the installation directory below:
C:\Users\UserName\AppData\Local\Programs\Python\Python39Note: The path may vary based on Python Version.
Once you are in that folder, run the python.exe program. You should see a command prompt window similar to the one shown below. If you get an error or the command prompt did not appear, repeat the installation process.
Now you should have Python 3.9 installed on your computer and ready to start the course. Another alternative is to use an online compiler (Not Recommended), which we will discuss in the section below.
Option 2: Use an Online Python Compiler
Another way to run Python code for this course is to use an online compiler. It’s always recommended to install Python on your computer as the online compiler may have some limitations, as well as it does not have the power to create projects and set up the environment.
However, you can still use an online compiler if you would like to start learning Python right away and worry about environment setup later.
Some of the Python online compiler that you can use:
Download Python Editor(Optional – Recommended)
Once Python is installed on your computer, you are ready to start coding in Python, by using any text Editor, such as Notepad. However, it’s recommended to use an Editor that has the tools to get the job done faster than using a simple text editor. For this purpose, we are going to use a popular Python Editor, PyCharm by JetBrains, which comes in two editions: Paid and Community.
Download and Install PyCharm:
- Go to https://www.jetbrains.com/pycharm/download/ and download the community version of Pycharm
- Follow the on-screen instructions to complete the installation
All set! Now you are ready to start your Python Learning journey!
Things to Remember
- Python is available to download from Python.org
- You can also use an online compiler to run your python code
- Use PyCharm for easier Python development and Project management.