Python Interpreter Visual Studio Code



Python

Environment data VS Code version: 1.29.1 Extension version (available under the Extensions sidebar): 2018.11.0 OS and version: Windows 10 Pro Python version (& distribution if applicable, e.g. Anaconda): 3.7 (32-bit) Actual behavior I do.

InterpreterPython interpreter for visual studio code

Python Repl Visual Studio Code

  1. Visual Studio supports Python version 2.7, as well as version 3.5 and greater. While it is possible to use Visual Studio to edit code written in other versions of Python, those versions are not officially supported and features such as IntelliSense and debugging might not work.
  2. I'm fairly new to Stack Exchange and not very well-versed in IDE's. I'm struggling to set up the ArcGIS Pro Python interpreter with Visual Studio Code. I have ArcGIS Pro 2.4.3 and VSC 1.44.2. I'm trying to follow the advice on the below thread, but I cannot ask questions in that thread, only add answers. Original Thread. So here's my question.

I’m starting to really, really, like MicroPython. I particularly like the way that you can use the REPL command prompt to test out code before dropping it into your programs. I’ve been using an editor called Thonny which is nice enough but of course what I really want is to be able to use Visual Studio Code. It turns out that there’s a plugin for this. It’s called Pymakr. It lets you transfer Python files between your PC and your MicroPython device and provides a REPL prompt too. If you want to use it you have to install Node.js first. I did this and then found that it didn’t work. My MicroPython board was not detected.

I was using one of my Doit boards which usually works fine. (I’ve just bought another one….) It turns out that Pymakr maintains a list of USB devices that it is willing to connect with. You need to make sure that your device is on the list in the configuration file Pymakr.json. Use the command Pymakr>Global Setting to open this file and then add your device manufacture to the list, like I’ve done below.

Vs Code Python Path

Note that this is not the the manufacturer of your device, it is the manufacturer of the USB interface that the device uses to connect to the PC.

Visual Studio Code Install

You can find the name that you need by opening Device Manager, right-clicking the com port where your board is connected and then getting the manufacturer name from the properties page:

I did this and everything started working. The Pymakr plugin has a nifty feature where it will copy all the Python files in your project into the device, or only copy the ones that you’ve changed. Very nifty.

Visual Studio Code Python Virtual Environment

If you’ve not played with MicroPython before I’ve written a tiny guide that you might find useful. You can find it here.