Visual Studio Code (or VS Code, as it is also known) is a modern Integrated Development Environment created by Microsoft and focused on the development of WEB applications. Among the main features is lightness, great customization capacity (through its extensions) and simplicity of use.
In this article you will learn how to install and configure Visual Studio Code to program in the Python language on the Windows operating system.
Step 01 - Downloading Python
If you already have Python correctly installed on your computer, you can skip to step 3!
The first thing we need to do is install Python.
Our website algol.dev provides you with an alternative link (button on the side) so that you can download Python more easily. The version we provide has been tested and approved!
Our website algol.dev provides you with an alternative link (button below) so that you can download Python more easily. The version we provide has been tested and approved!
If you prefer, you can click here and download from the official Python website. However, we recommend that you download version 3.8.
Step 02 - Installing Python
Go to the folder where the Python file you just downloaded is located and run it to perform the installation.
The Python installation window will open. The process is quite simple. See the slide below for the installation steps.
Make sure to check the option "Add Python to PATH" and click on "Customize installation".
Make sure all options are checked and click "Next".
Make sure that the option "Install for all users" is checked, leave the others as default, make sure that the installation directory is the folder "Program Files" and click "Install".
At the end of the installation, click on the "Close" button.
Python is installed!
Step 03 - Downloading Visual Studio Code
If you already have Visual Studio Code installed on your computer you can go straight to step 5!
The first thing you need to do is download the program.
Our website algol.dev provides you with an alternative link (button on the side) so that you can download VS Code more easily.
Our website algol.dev provides you with an alternative link (button below) so that you can download VS Code more easily. A portable version, tested and approved!
If you prefer, you can click here and access the official VS Code website at Microsoft.
However, we recommend that you download the version we provide, as our installation instructions are based on the version we provide.
Step 04 - Installing Visual Studio Code
Once downloaded, access the folder where the file is located and extract its contents to a folder at the root of the C directory. Or if you prefer, you can place it in any other directory.
After extracting Visual Studio Code, open the program by double-clicking its icon:
After opening the program, its interface will be displayed and the configuration folder will be created in the user’s directory.
Step 05 - Downloading and installing the Python extensions for VS Code
In order for you to program in Python, we need to install some extensions in Visual Studio Code.
First, close Visual Studio Code.
Our website algol.dev provides you with an alternative link (button on the side) so that you can download and install extensions more easily.
Our website algol.dev provides you with an alternative link (button below) so that you can download and install extensions more easily.
If you prefer, you can install the extensions following the instructions on the official website. But we advise you to follow our instructions, as they are simpler and easier.
If you choose the official instructions, here are the names of the extensions you should download: “Code Runner”, “Jupyter”, “Python” and “Pylance”.
Once the extensions are downloaded, access the folder where the file is located and extract its contents to the VS Code extensions directory in the user’s folder.
It is located in “C:\Users\username\.vscode\extensions”. Where “username” should be replaced with your user name in the system.
After this process, you will be able to see the 4 folders within the VS Code extensions directory.
Go to the VS Code installation folder and double-click its icon to open the program again:
After this process, click on the extensions icon to confirm that the 4 extensions have been properly installed.
Visual Studio Code is ready and configured for you to program in Python.
Step 06 - Testing VS Code Python
Finally, let’s create a project and run a Python application, to make sure that the installation was successful. See the steps below.
Click on the "File > New File" option to create a new file.
After creating the new file, click on the option "File > Save As..." and save the file with the name Teste.py (it is essential that the name has the extension .py at the end).
If the message "No Python interpreter is selected" appears, click on the "Select Python Interpreter" option.
At the top of the screen, select the Python interpreter that was installed in step 2.
If the message "Linter pylint is not installed" appears, click on the "Install" option.
Finally, type the "print" command in Python and click the "Run Code" button to run the program.
If the message “Algol.dev” is displayed on the OUTPUT panel (bottom of the screen), it means that everything is ok and you can now start programming in Python using Visual Studio Code.