Running Python and Visual Studio Code in Windows

1 Comment

In this post, we will look at how to run Python with Visual Studio Code in Windows.

To install Python, go to the Python download page at https://www.python.org/ and click on Downloads:

Click Download Python:

This will download the file:

Check Add Python to PATH and click to Install. Note this also installs IDLE (the IDE), pip (the package installer) and documentation:

Note customizing gives us:

Click Close once complete:

Note the links above are:

Now, IDLE is installed, and we can access it through the Windows Start menu:

Opening it, we can start typing commands:

Let’s see which modules are installed, by typing:

help("modules")

We see the modules installed:

We will use Visual Studio Code as our IDE to write Python scripts. Open VS Code and go to Extensions, and find the Python extension:

Click Install:

Now let’s install a module. From the Visual Studio terminal, let’s install Requests:

pip install requests

This installs the module:

To run a simple “Hello World”, enter the following text and save the file as HelloWorld.py. Right-click and run the code by selecting Run Python File in Terminal:

 

THANKS FOR READING. BEFORE YOU LEAVE, I NEED YOUR HELP.
 

I AM SPENDING MORE TIME THESE DAYS CREATING YOUTUBE VIDEOS TO HELP PEOPLE LEARN THE MICROSOFT POWER PLATFORM.

IF YOU WOULD LIKE TO SEE HOW I BUILD APPS, OR FIND SOMETHING USEFUL READING MY BLOG, I WOULD REALLY APPRECIATE YOU SUBSCRIBING TO MY YOUTUBE CHANNEL.

THANK YOU, AND LET'S KEEP LEARNING TOGETHER.

CARL

https://www.youtube.com/carldesouza

 

ABOUT CARL DE SOUZA

Carl de Souza is a developer and architect focusing on Microsoft Dynamics 365, Power BI, Azure, and AI.

carldesouza.comLinkedIn Twitter | YouTube

 

One Response to Running Python and Visual Studio Code in Windows

Leave a Reply

Your email address will not be published. Required fields are marked *