{"id":124,"date":"2020-10-03T04:46:33","date_gmt":"2020-10-03T04:46:33","guid":{"rendered":"https:\/\/www.pythontutorial.net\/?page_id=124"},"modified":"2025-03-25T07:05:40","modified_gmt":"2025-03-25T07:05:40","slug":"setup-visual-studio-code-for-python","status":"publish","type":"page","link":"https:\/\/www.pythontutorial.net\/getting-started\/setup-visual-studio-code-for-python\/","title":{"rendered":"Setup Visual Studio Code for Python"},"content":{"rendered":"\r\n<p><strong>Summary<\/strong>: in this tutorial, you&#8217;ll learn how to set up Visual Studio Code for Python development.<\/p>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\" id='a-quick-introduction-to-the-visual-studio-code'>A quick introduction to the Visual Studio Code <a href=\"#a-quick-introduction-to-the-visual-studio-code\" class=\"anchor\" id=\"a-quick-introduction-to-the-visual-studio-code\" title=\"Anchor for A quick introduction to the Visual Studio Code\">#<\/a><\/h2>\r\n\r\n\r\n\r\n<p>Visual Studio Code, often called VS Code, is a lightweight source code editor that runs on your desktop and is available for Windows, macOS, and Linux.<\/p>\r\n\r\n\r\n\r\n<p>VS Code has many features, such as IntelliSense, code editing, and extensions, allowing you to edit Python source code effectively. The best part is that it is open-source and free.<\/p>\r\n\r\n\r\n\r\n<p>Besides the desktop version, <a href=\"https:\/\/vscode.dev\/\" target=\"_blank\" rel=\"noreferrer noopener\">VS Code has a browser version<\/a> that you can use directly in your web browser without installing it.<\/p>\r\n\r\n\r\n\r\n<p>This tutorial teaches you how to set up Visual Studio Code for a Python environment so that you can edit, run, and debug Python code.<\/p>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\" id='setting-up-visual-studio-code'>Setting up Visual Studio Code <a href=\"#setting-up-visual-studio-code\" class=\"anchor\" id=\"setting-up-visual-studio-code\" title=\"Anchor for Setting up Visual Studio Code\">#<\/a><\/h2>\r\n\r\n\r\n\r\n<p>To set up the VS Code, you follow these steps:<\/p>\r\n\r\n\r\n\r\n<p>First, navigate to the <a href=\"https:\/\/code.visualstudio.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">VS Code official<\/a> website and download the VS code based on your platform (Windows, macOS, or Linux).<\/p>\r\n\r\n\r\n\r\n<p>Second, launch the setup wizard and follow the steps.<\/p>\r\n\r\n\r\n\r\n<p>Once the installation is completed, you can launch the VS code application:<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"834\" height=\"500\" class=\"wp-image-125\" src=\"https:\/\/www.pythontutorial.net\/wp-content\/uploads\/2020\/10\/Setup-visual-studio-code-for-Python.png\" alt=\"\" srcset=\"https:\/\/www.pythontutorial.net\/wp-content\/uploads\/2020\/10\/Setup-visual-studio-code-for-Python.png 834w, https:\/\/www.pythontutorial.net\/wp-content\/uploads\/2020\/10\/Setup-visual-studio-code-for-Python-300x180.png 300w, https:\/\/www.pythontutorial.net\/wp-content\/uploads\/2020\/10\/Setup-visual-studio-code-for-Python-768x460.png 768w\" sizes=\"auto, (max-width: 834px) 100vw, 834px\" \/><\/figure>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\" id='install-python-extension'>Install Python Extension <a href=\"#install-python-extension\" class=\"anchor\" id=\"install-python-extension\" title=\"Anchor for Install Python Extension\">#<\/a><\/h2>\r\n\r\n\r\n\r\n<p>Install the Python extension from the Visual Studio Marketplace to make the VS Code work with Python.<\/p>\r\n\r\n\r\n\r\n<p>The following picture illustrates the steps:<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"681\" height=\"246\" class=\"wp-image-126\" src=\"https:\/\/www.pythontutorial.net\/wp-content\/uploads\/2020\/10\/VS-Code-Python-Extension.png\" alt=\"\" srcset=\"https:\/\/www.pythontutorial.net\/wp-content\/uploads\/2020\/10\/VS-Code-Python-Extension.png 681w, https:\/\/www.pythontutorial.net\/wp-content\/uploads\/2020\/10\/VS-Code-Python-Extension-300x108.png 300w\" sizes=\"auto, (max-width: 681px) 100vw, 681px\" \/><\/figure>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li>First, click the <strong>Extensions<\/strong> tab.<\/li>\r\n\r\n\r\n\r\n<li>Second, type the <code>python<\/code> keyword on the search input.<\/li>\r\n\r\n\r\n\r\n<li>Third, click the <code>Python<\/code> extension. It&#8217;ll show detailed information on the right pane.<\/li>\r\n\r\n\r\n\r\n<li>Finally, click the <strong>Install<\/strong> button to install the Python extension.<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<p>Now, you&#8217;re ready to develop the <a href=\"https:\/\/www.pythontutorial.net\/getting-started\/python-hello-world\/\">first program in Python<\/a>.<\/p>\r\n<div class=\"helpful-block-content\" data-title=\"\">\n\t<header>\n\t\t<div class=\"wth-question\">Was this tutorial helpful ?<\/div>\n\t\t<div class=\"wth-thumbs\">\n\t\t\t<button\n\t\t\t\tdata-post=\"124\"\n\t\t\t\tdata-post-url=\"https:\/\/www.pythontutorial.net\/getting-started\/setup-visual-studio-code-for-python\/\"\n\t\t\t\tdata-post-title=\"Setup Visual Studio Code for Python\"\n\t\t\t\tdata-response=\"1\"\n\t\t\t\tclass=\"wth-btn-rounded wth-yes-btn\"\n\t\t\t>\n\t\t\t\t<svg\n\t\t\t\t\txmlns=\"http:\/\/www.w3.org\/2000\/svg\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t\tclass=\"feather feather-thumbs-up block w-full h-full\"\n\t\t\t\t>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3\"\n\t\t\t\t\t><\/path>\n\t\t\t\t<\/svg>\n\t\t\t\t<span class=\"sr-only\"> Yes <\/span>\n\t\t\t<\/button>\n\n\t\t\t<button\n\t\t\t\tdata-response=\"0\"\n\t\t\t\tdata-post=\"124\"\n\t\t\t\tdata-post-url=\"https:\/\/www.pythontutorial.net\/getting-started\/setup-visual-studio-code-for-python\/\"\n\t\t\t\tdata-post-title=\"Setup Visual Studio Code for Python\"\n\t\t\t\tclass=\"wth-btn-rounded wth-no-btn\"\n\t\t\t>\n\t\t\t\t<svg\n\t\t\t\t\txmlns=\"http:\/\/www.w3.org\/2000\/svg\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M10 15v4a3 3 0 0 0 3 3l4-9V2H5.72a2 2 0 0 0-2 1.7l-1.38 9a2 2 0 0 0 2 2.3zm7-13h2.67A2.31 2.31 0 0 1 22 4v7a2.31 2.31 0 0 1-2.33 2H17\"\n\t\t\t\t\t><\/path>\n\t\t\t\t<\/svg>\n\t\t\t\t<span class=\"sr-only\"> No <\/span>\n\t\t\t<\/button>\n\t\t<\/div>\n\t<\/header>\n\n\t<div class=\"wth-form hidden\">\n\t\t<div class=\"wth-form-wrapper\">\n\t\t\t<div class=\"wth-title\"><\/div>\n\t\t\t<textarea class=\"wth-message\"><\/textarea>\n\t\t\t<input type=\"button\" name=\"wth-submit\" class=\"wth-btn wth-btn-submit\" id=\"wth-submit\" \/>\n\t\t\t<input type=\"button\" class=\"wth-btn wth-btn-cancel\" value=\"Cancel\" \/>\n\t\t<\/div>\n\t<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, you&#8217;ll learn how to set up Visual Studio Code for Python development.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":39,"menu_order":2,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-124","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.pythontutorial.net\/wp-json\/wp\/v2\/pages\/124","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pythontutorial.net\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.pythontutorial.net\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.pythontutorial.net\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pythontutorial.net\/wp-json\/wp\/v2\/comments?post=124"}],"version-history":[{"count":0,"href":"https:\/\/www.pythontutorial.net\/wp-json\/wp\/v2\/pages\/124\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/www.pythontutorial.net\/wp-json\/wp\/v2\/pages\/39"}],"wp:attachment":[{"href":"https:\/\/www.pythontutorial.net\/wp-json\/wp\/v2\/media?parent=124"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}