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:
1 2 | ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" |
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 Visual Studio Code
Before installing Visual Studio Code, we update HomeBrew with the following command:
1 2 3 | brew update brew tap caskroom/cask |
Then install Visual Studio Code by entering the following command:
1 2 | brew cask install visual-studio-code |
Open Visual Studio Code (/ Applications / Visual Studio Code). At the welcome screen select Add workspace folder...
create a folder with the name hello
Right-click on the folder, select New File
and name the file hello_world.py
.
Enter the following code into the file hello_world.py
.
1 2 | print("Hello to Python world!") |
Click on the lower left corner of the screen to select the latest Python version, here I choose 3.8.1
Right-click on the text editor, select Run Python File in Terminal
The result will be Hello to Python world!
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 .