Click here to Skip to main content
13,633,280 members
Click here to Skip to main content
Add your own
alternative version

Tagged as

Stats

26.4K views
2 bookmarked
Posted 17 Apr 2016
Licenced CPOL

How to Use Python3 in Visual Studio Code

, 17 Apr 2016
Rate this:
Please Sign up or sign in to vote.
How to configure Visual Studio code to work with Python3

Introduction

I love Visual Studio Code, really – it’s the longest lasting fav thing I’ve had, like, for evah! … I used to hack on Sublime, but I deleted it last week (for evah) in favor of vs code … it's the business.

Anyway, my love for it aside – I was starting some R&D the other day using it, and couldn’t get the darn thing to play nice with the latest version of Python. Using V2, no hassle, but V3 … nope … and dig as I might, I couldn’t find what settings to change. I reached out to @code who sent me to the wiki that kinda helped, but not quite…

Configure VS Code for Python3

After a lot of poking around and going down rabbit holes, I found the solution, you need to tweak the tasks.json file to tell it to use Python V3.

To get to that file, in vscode (mac) cmd+shift+P – type ‘task’ – select ‘configure task runner’, and edit the file to point the “command” at “python3”, and the (command line) args to point at ${file}. Save, Debug/Run .. works! … now, back to coding. :)

History

  • V1 - 17th April, 2016

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

AJSON
Engineer
United Kingdom United Kingdom
Architect/engineer, student, always learning and refactoring my wetware. Happiest tucking into a big bowl of c# or python sprinkled with a crisp topping of Javascript...started with a single ZX80 a lifetime ago, now happily explore, build and create on interweb scale...



  • 1 Apr 2017 - Awarded Microsoft MVP for 2017
  • 18 Mar 2017 - "Calculating distance using Google Maps in ASP.NET MVC" - article of the day on ASP.net
  • 31 Dec 2016 - "How to improve Single Page App and Hybrid mobile performance" - article of the day on ASP.net
  • 23 Oct 2016 - "Multi-user/resource web diary in C# MVC with repeat events" - article of the day on ASP.net
  • 7 Jun 2016 - "Upload large files to MVC / Web API using partitioning" - article of the day on ASP.net
  • 16 Sep 2015 - "Single Page Application with MVC and SammyJS" - article of the day on ASP.net
  • 01 Sep 2015 - "KnockoutJS nested arrays in MVC" - article of the day on ASP.net
  • 21 Aug 2015 - "Audit trail and data versioning with C# and MVC" - article of the day on ASP.net
  • 6 Oct 2014 - "Full Calendar – A Complete Web Diary System for jQuery and C# MVC" - article of the day on ASP.net



You may also be interested in...

Pro
Pro

Comments and Discussions

 
-- There are no messages in this forum --
Permalink | Advertise | Privacy | Cookies | Terms of Use | Mobile
Web02 | 2.8.180712.1 | Last Updated 17 Apr 2016
Article Copyright 2016 by AJSON
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid