Install and configure Python3 for Mac OS Visual Studio Code

Tram Ho

Before installing Visual Studio Code you need to install Python. See the tutorial article below:

Instructions for installing Python

Visual Studio Code: is open source, a powerful tool for programming with the advantage of being lightweight and supporting multiple languages: Python, ReactJS, Node, …

We will use Homebrew to install Visual Studio Code.

Homebrew is a popular package management tool, used to install open source software such as: Node.

Install HomeBrew

Open the terminal application (/ Applications / Utilities / Terminal) and run the following command:

During the installation process, you will be asked to enter your password, enter your computer’s password, and wait for 1-2 minutes to install, depending on network speed.

Install HomeBrew Terminal

Install Visual Studio Code

Before installing Visual Studio Code, we update HomeBrew with the following command:

Then install Visual Studio Code by entering the following command:

Open Visual Studio Code (/ Applications / Visual Studio Code). At the welcome screen select Add workspace folder... create a folder with the name hello

Welcome screen

Right-click on the folder, select New File and name the file hello_world.py .

New File

Enter the following code into the file hello_world.py .

Click on the lower left corner of the screen to select the latest Python version, here I choose 3.8.1

Select Python version

Right-click on the text editor, select Run Python File in Terminal

The result will be Hello to Python world!

Hello Result

summary

Homebrew is a popular package management tool, used to install open source software. Using Homebrew helps us install Visual Studio Code in a short time.

During the installation. If you have problems installing, please comment below, I will support you as soon as possible!

Thank you for your interest in this article.

Refer to Homebrew Installation .

Share the news now

Source : Viblo