Setup Python Development Environment With VSCode On Windows
 

Setup Python Development Environment With VSCode On Windows

 

Visual studio code (VS Code) is a free and open-source IDE that is developed by Microsoft. It is a lightweight IDE that has powerful features like smart code completion, code linting for potential errors, debugger, etc.

You can set up VS code for development using Python programming language by installing python extension. In this article, we will discuss how to set up VS Code for Python development on Windows.

Download and install Python on Windows

Visit and download the latest version of Python from its official website python.org and then choose an appropriate file for your system. For example – you can download the 64-bit version of python for Windows 10 by clicking on the Windows installer (64-bit) link.

Now click on the downloaded package, mark the Add Python 3.9 to PATH, and then click on Install Now as given in the image below. Follow the steps after it gets successfully install you will see Setup Was Successful on your screen.

How to install git bash on Windows

Git Bash is an application for Windows that emulates the git command line. Bash or bourne again shell is used on Unix-like operating systems such as it is used on Linux. We will use bash commands on Windows for operations such as creating files, directories, navigating from one directory to another, etc.

Go to the official website of git bash and download its latest version.

Click on Next choose the appropriate options if displayed by the installer. After it gets installed on your system you can launch the bash shell and start using Linux commands on it.

How to download and install VS Code on Windows

Next, go to the visual studio code’s official website and download the VS code for Windows. You can also download it by clicking here. Once it gets downloaded click on the downloaded package to install VS code on your system. Accept the license agreement and install the setup by clicking on Next.

Setup the VS code IDE

You have successfully installed VS code IDE on your system. Now search VS code in the main menu and click on the VS code icon to launch it.

Next press ctrl+shift+x or click on extensions as displayed in the image below and then search python in the search bar. Click on the first python extension that appears in the search results and install it.

Once the extension gets successfully installed, reopen your IDE, now if it suggests installing any additional packages then install them.

Integrate git bash in VS code

To integrate bash in visual studio code, click on the link here scroll and find the Windows section and copy the git bash part as shown in the image below.

Next, go to File>Preferences>Settings and then click on the Open Setting(JSON) icon given on the upper right side in the IDE screen. If it has some value then paste the copied value separated with a comma.

You can view the pasted value in the setting.json file, see the image below-

Press the Ctrl+s to save the changes. Now reopen the vs code IDE and press Ctrl+` to open the terminal window inside the VS code.

Now everything is ready you can start writing code.

Previous Setup Python Development Environment With VS Code In Linux
Next How to install Python pip on Linux?
 

About author

You might also like

Programming 0 Comments

Python Lambda Function

The Lambda function in Python programming which is also known as anonymous function is a function without any name. It is a small function restricted to a single line. Like

Programming 0 Comments

Python Numeric Data Types

Numeric data types are numbers stored in the memory. You can perform operations such as addition, subtraction, multiplication, division, modulo, etc on numeric data. The following data types can be

Python Programming 0 Comments

Python Strings

A string is a sequence or a collection of characters enclosed within single or double-quotes. In Python, the print() function is used to display a string. Since a computer understands

0 Comments

No Comments Yet!

You can be first to comment this post!

Leave a Reply