Setting Up Visual Studio To Work With Python

Introduction

 
In this article, I will show you how to set up the environment in Visual Studio, to use Python in it. For setting up the environment, we have to download the Python MSI for the respective Visual Studio version. Here, I am using Visual Studio 2013, so I am downloading the 2013 MSI file, from this link.
 
Check the MSI for Visual studio 2013.
 
 
Click on Python Tools for VS 2013. It will start downloading the file.
 
Now, open the downloaded file.
 
 
 
Click on Install.
 
 
 
Click OK.
 
 
It will start installing the setup on your PC.
 
 
Click Finish to complete the installation.
 
Now, Open your Visual Studio 2013 and create a new Project. Choose the project template as Python and check that all the templates have been installed in your Visual studio.
 
 
Thus, in this way, you can integrate Python in Visual Studio.
 
Now, click on Python Application Template and click OK. It will show an empty screen. Write the following code, there:
  1. print("Enter a Number")  
  2. a=int(input())  
  3. print("Enter second Number")  
  4. b=int(input())  
  5. c=a+b  
  6. print("The Result Is:")  
  7. print(c)  
So, this python program takes two inputs from the user and displays their sum on the console. Here is the output:
 
 
So, in this way, we can start Python programming in Visual Studio. Hope this tutorial will give you some basic idea about integrating Python in Visual Studio. If you have any problems regarding this article, you can comment so I can improve it.


Similar Articles