Python with VS Code
Last updated
Last updated
We will learn how to program Python *.py in VS Code.
We want to make sure VSCode recognizes the Anaconda installation so it can access installed packages for autocomplete, syntax highlighting, and error checking.
Anacond and Conda Virtual Environment : e.g. py37
Python and Numpy Installed by Conda
​
Open VS Code
Press Extension Icon or Press < Ctrl
+Shift
+X
>
Install Python (Microsoft)
Create a new test folder
Example: \Tutorial_pythonOpenCV
Open the folder in VS Code
Let's select the virtual environment for this tutorial.
Assumed we already have created Conda Environment.
Press F1
> 'Python: Select Interpreter' > Choose py37
as the Interpreter
(1) Create a new file
(2) Name the file as TU_pytest.py
(3) Program the code
(4) Run Python File
(5) It should give the output as
[1 4 9]