DOWNLOADING VSCODE AND PYTHON
Now, we are going to get our systems ready, so that we can write many different python programs. Soon, we are going to dive into learning many different concepts in python programming language. So, we need to get our systems ready, so that we can write the python programs. So, what are the things that we are going to need?
First, we are going to write the programs somewhere. So, on computers, we can use our built-in text editors, like notepad for windows, TextEdit for Mac, etc.. or even you can download some text editors or code editors, or an Integrated Development Environment (IDE), like a sublime text editor, Atom, Visual Studio Code, PyCharm, etc…
But here, for us to easily get started and get going, we are going to make use of a code editor, which is Visual studio code. Or you can also download PyCharm. Visual Studio Code is a free and open-source code editor, by Microsoft, which we can use here, but if you are familiar with some other code editor, or other environments, you can use that too.
If you want to install some other text editor, code editor, or IDE, you are free to do that, because anyways, the code that we are going to write is in python, and it is going to be the same even if you are doing it in notepad. But if you want to follow along completely in this course, you can consider downloading and installing the Visual Studio code.
With the help of an IDE, you can write programs in python and run them in the same environment.
There are many other advantages of downloading an IDE, like –
- write codes and run them in the same environment.
- It applies some colors to the text of the code so that they can be easy to understand for us.
- It helps us add indents(spaces) (indents are very much important in python as you will learn ahead in the course).
- It is simply useful. When you use the IDE, you will get to know much more about it.
So, one thing that we are going to need is some environment where we can write python programs. Another thing that we need here, is python. We are going to need to download and install python into our systems, which enables us to run the python programs that we are going to write. We can download python from the official website.
So, now we are going to head to the downloading and installing part for both of the above things.
These are some steps we need to follow to download and install python →
Follow the given steps and install python in your systems –
- Open browser. (Also make sure you are connected to the internet, as we are going to need it to download python)
- head to https://www.python.org/
- Go to the Downloads section. (Or even you can hover over download)
- You will find a button with the latest python version written. By clicking this button, you will get the latest version of python installed. (If the latest version of python is not supported by your operating system, then you can download some lower versions of python from the release section in downloads. You can find them in the downloads section)
- You have to now run the downloaded executable file. For that, move to the folder where you downloaded python.
- Once you are there, just double-click the executable file, and an installation wizard should open. (If it is asked for any permissions, you can click on yes there).
- Make sure you tick the checkbox at the bottom, which says “add Python 3.x to path”. (it’s very important, and it is at the bottom of the wizard window)
- complete the setup wizard and you are done.
So, we have successfully installed python into our systems.
You can check the version of python that was installed, by opening the terminal (command prompt), and typing python –version, and it will show you what version of python was installed.
You can also simply type python(or python3) onto the terminal (instead of python –version), and you would get to see the version that is installed, and some other information as well. Also, you can type some code in python here as well.
Now, it’s time to download the code editor that we are going to use, i.e., Visual Studio Code (VSCode).
Follow the given steps to download and install the VSCode into your system.
- Open browser.
- Search for visual studio code or go to https://code.visualstudio.com/
- You can see the download button there, clicking which will download Visual Studio Code into your system.
- Now you can install the VSCode and configure it to use it for writing programs in Python.
- Once you start writing python programs, it would suggest you some extensions that would help us with different things, like auto-completion, etc… you can install that extension, or even you can do that manually by simply going to the extensions section (which can be found as one of the options, in the leftmost pane). You just need to go there, type python, and install the recommended extension.