Get Started with Python in VSCode on Debian and Ubuntu-based distributions
“Python is a general-purpose interpreted, interactive, object-oriented, and high-level programming language. It was created by Guido van Rossum from 1985 to 1990. Like Perl, Python source code is also available under the GNU General Public License (GPL). This tutorial gives enough understanding of Python programming language.” ~Tutorialspoint
Procedure:
- If you have not already done so, install VSCode.
- Next, install the Python extension for VS Code.
- Launch VS Code Terminal (Ctrl+`
), paste the following command and press enter and it will automatically do that.
ext install ms-python.python

OR you can,
- Click on extension-tab.
- Put python in the search box.
- Click the
Python
extension to get detailed information on the right pane. - Finally, click the Install button to install the Python extension.

3. Install a Python interpreter:
Multiple methods are given below:
- From Official Source:
Once Visual Studio Code is up and running, the next thing that we would need to set up is a python interpreter. Let us first navigate to https://www.python.org/downloads/ and download Python. Open download directory. You’ll get “*.tar.xz” file. Open terminal (Ctrl + Alt + T) and type following commands.
tar xzf fileName.tar.gz # to extract
./configure
make
sudo make install

Or
- Using apt-package:
sudo apt update #update packages list
sudo apt-get install python#Done
Or
- Using Deadsnakes PPA:
By default, you can’t add PPAs to your system’s package lists. The “software-properties-common” package provides you an efficient way to manage and add PPAs to your system.
#To get above mentioned package
sudo apt-get install software-properties-common#Adding the deadsnakes PPA to your system’s sources list:
sudo add-apt-repository ppa:deadsnakes/ppa#Updating your system's package lists:
sudo apt-get update#Download the latest version of Python from the added PPA:
sudo apt-get install python3
Since the Deadsnakes PPA has almost every version of Python in its database, you can install older versions of Python as well. Just replace the package name with the version of python you want to install on your computer.
sudo apt-get install python3.2
sudo apt-get install python3.3
sudo apt-get install python3.8
4. Now, For confirmation, check version:
#to check version type: python --version
#or
python3 --version# syntax to compile newFile.py
python newFile.py
#or
python3 newFile.py
Now, you’re ready to develop the first program in Python. Enjoy!