How do I set up visual studio code with Python?
Go to File > Preferences > Settings.
Select Workspace Settings and in the Search bar enter the key word pythonpath.
Copy the path to the python.exe file installed on your PC.
Paste the path in the Python Path setting, highlighted below:
Right click on This PC > Properties > Advanced system settings > Environment Variables.
Edit the environment variable ‘path’:
Browse to the directory where the pip3 exe file is available. pip3 is usually found inside the Scripts folder (under the same directory of python.exe).
Select OK to add the path to the environment variable.
Now we have set up the required environment variables.
Click on the file icon to create a new file. Give the file a name ending with the extension ".py" (stands for python).