Visual Studio Code (Mac) - Setting up a Python Development Environment and Complete Overview

Corey Schafer · 284K views · 2019 · 1:15:44

Open on YouTube

Testing, debugging & developer toolsPython, Ruby & scripting languagestutorialdated

Why Stack Overflow recommends it

Stack Overflow users link it when answering VS Code on Mac problems like picking the right Python interpreter, configuring Code Runner with virtualenvs, or installing the Python extension.

Recommended by 3 people across 3 different months, 2019 to 2022.

What it is

A 75-minute tutorial by Corey Schafer on setting up Python development in Visual Studio Code on macOS. It covers installing VSCode and the Python extension, switching interpreters, virtual environments, formatting and linting, Code Runner, Git integration, debugging and unit testing.

What people said

Recommends Daniel Ayk · 2019-10 · Stack Overflow · on “VS Code Code Runner doesn't work with virtualenvs”

If you watch this [this video] video, you can see the solution at 44.55 min if you are a mac user. You have to define your $pythonPath . However, you don't have to define $fullFineName . It is already done for you if Code Runner installed Add this to user setting: "python.pythonPath": "/Users/danielaaa/miniconda3/envs/tf/bin/python" , "code-runner.executorMap": { "python": "$pythonPath -u $fullFileName"}

Recommends Kamal Ahmed · 2021-05 · Stack Overflow · on “VS Code Output result different from Terminal result”

The problem I had was, that my Output window was using python 2.7.16 as default. To change it to python 3.8.2, I found the answer in this video: [this video] , starting from min 43:00. I hope this helps others!

Recommends Kamal Ahmed · 2021-05 · Stack Overflow · on “VS Code Output result different from Terminal result”

I just started learning python about a week ago and I am using VS code. I am trying to run the following code: import pandas as pd df = pd.read_csv('ClassMarks.csv') pd.set_option('display.max_rows', 85) df['Final Marks'] = df['CPQ']+df['HW']+df['Tutorials']+df['Tests'] print(df) in the Output terminal it gives: File "/Users/User1/Desktop/test", line 1, in <module> import pandas as pd ImportError: No module named pandas while the Terminal gives me the result table I expect, with no errors. Does anyone knows what is happening or how to fix it? Thanks in advance! Edit : The problem I had was, that my Output window was using python 2.7.16 as default. To change it to python 3.8.2, I found the an

Recommends FlyingFish · 2022-03 · Stack Overflow · on “Is there a way to download Python for Visual Studio on MacOS?”

It 100% should be available. You should be able to install it directly from the Extensions tab. If you don't find it, here's a video I found that goes step-by-step through setting up VSCode for Python on MacOS : [this video]