Python and Visual Studio Code on Windows 10.
Tags: python, vscode, programming, tutorial
Published: 2023-05-14 18:39:14

[GitHub: Salah Ud Din - 4yub1k](https://github.com/4yub1k)

#### Goals:

- Download the Python setup.
- Install Python.
- Download the VScode setup.
- Install VScode.
- Install the VScode extension “Python”.
- Run you first python.py script.
- Video tutorial complete.

#### Download Python:
Go to Python official page : [[Link](https://www.python.org/)]. And drop down Downloads, click “windows” in sub menu.

![Download Python](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/csxvneova79x38v5dorq.png)

Now, Under “Stable Releases”, scroll down and search for the required version. As I need to install python’s latest version for **[“windows 64-bit”](https://www.python.org/ftp/python/3.11.1/python-3.11.1-amd64.exe)**, will select “Windows installer (64-bit)”, you can check whether your windows version is 64 or 32 bit, just visit Microsoft : [[windows version](https://support.microsoft.com/en-us/windows/32-bit-and-64-bit-windows-frequently-asked-questions-c6ca9541-8dce-4d48-0415-94a3faa2e13d)].


![Python Versions](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/97v53ge7mtpm3t2pwohv.png)

#### Install Python:

Open the downloaded python installer, you will see this window as shown in image below. Check the “ADD pathon.exe to PATH” then click on “**Install Now**”.

![Install Python](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5w9asbqp6tkhjlokptic.png)


![Python installation successful](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oa790arnu94dn45xuas3.png)
Python installation successful.

#### Download VScode:

Go to VScode official page : [[Link](https://code.visualstudio.com/)]. And click on Download at right top corner.


![Download Vscode](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yqqokaqhf87ct6dzbk8b.png)

As we don’t want the vscode to run for all users, we will install “User Installer”. Click on x64 in front of User Installer to downloads it.


![VScode Version](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/upbqhtlzz72kegx0kxa6.png)

#### Install VScode:
Open the vscode .exe you download.


![Install VScode](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ozqi6ffjeh7pl4ryshw2.png)

Click “I accept the agreement”, and keep clicking Next. If you want shortcut of vscode on Desktop screen, make sure to check this box as shown below.


![VScode](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/901i23bvqf7hx0hikmfv.png)

![VScode](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5oin2kll7vpje5iqnd8c.png)
VScode installation completed, click finish to open VScode.

#### Install Python Extension:
Now, we need to install a very powerful extension of vscode for python. For more about it, go to link [[Python Extension](https://marketplace.visualstudio.com/items?itemName=ms-python.python)]. Click on the Extensions as shown.


![VScode](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/aedqtned7xrcjyy1ieuv.png)

Search for python in search box.


![VScode](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9gsbesq3irpnvv7cfkkr.png)
Click the one from Microsoft.


![VScode](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d7hdsbaqhthdpd1jqbdo.png)
Then click on install the extension and wait for installation to complete. We are ready !


![VScode](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fxbn1ymxacorolo1bwj1.png)

#### Run Python Script:
create a file , fileName.py. We will use first as file name here, ‘first.py’.
Go to “Terminal Menu” and click “New Terminal”

![Python VScode](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iqb2huknm59cldw2548m.png)

It will open the command line for you.


![VScode Terminal](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qxi2zj4xok6wtchvc9wt.png)
Enter “py fileName.py” to run the script.


![VScode](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v82hove6eg3xna04z37x.png)


Video Link : [[Python & VScode Installation](https://www.youtube.com/watch?v=D8swqvpFDM8&ab_channel=NerdyAyubi)]
{% youtube D8swqvpFDM8 %}

Thank you. 😎👍