Depending on your operating system, Tkinter might need a manual nudge. For Windows
Search for "Python" and install the official extension by Microsoft. Step 3: Verify or Install Tkinter how to download tkinter in visual studio code
If you haven't already, you need the Python extension to run code efficiently. Open VS Code. Depending on your operating system, Tkinter might need
Re-run the installer and check "tcl/tk" or use the Linux apt-get command above. Depending on your operating system
Tkinter is included by default with most standard Python installations. Visit python.org. Download the latest version for your OS.
Create a new file named test_gui.py and paste the following code:
Click the icon on the left sidebar (or press Ctrl+Shift+X ).