CS-WIKI101
|
NOTE Tested on macOS Sonoma 14.0
These instructions are specifically tailored for students in CS111, DS223 and other courses that use Python. The steps in this guide will help you install Python, Visual Studio Code and the Python extension for Visual Studio Code on macOS.
NOTE If you already have
Python
installed, you can skip these steps.
Follow the instructions provided in the README to install Python on macOS.
Visual Studio Code is a lightweight yet powerful source code editor. Follow the steps below to download and install Visual Studio Code on macOS:
Click on the Download for macOS</kdb>
After the download is complete, open Finder
and navigate to the Downloads
folder.
Locate the
VSCode.app
file in the Downloads
folder.
Drag and drop the VSCode.app
file from the Downloads
folder to the Applications
folder. This will install Visual Studio Code on your macOS.
Once the installation is complete, you can launch Visual Studio Code from your
Applications
folder and start using it for your programming tasks.
Step 3. Add the code
command to the PATH
Adding the
code
command to the PATH allows you to open Visual Studio Code from the Terminal. Follow the steps below to add the code
command to your PATH on macOS:
Shift + Command + P
shell command
and select the option "Shell Command: Install 'code' command in PATH". After completing these steps, you can now open Visual Studio Code from the Terminal by typing
code
and pressing Enter. This allows for easier access and quick code editing directly from the command line.
Step 4. Install the Python Extension for Visual Studio Code
To enhance your Python development experience in Visual Studio Code, you can install the Python extension.
Ctrl + Shift + X
Python
in the Extensions Marketplace.Python
extension by Microsoft and click the Install
button next to it.Additional Step: Opening Terminal from a Directory
If you want to open the terminal directly from a specific directory, you can follow these steps:
Services
from the context menu.New Terminal at Folder
to open the terminal at that directory. References
Source | Description |
---|---|
Visual Studio Code Documentation | Official documentation for Visual Studio Code |
Python Extension for Visual Studio Code | Python extension for Visual Studio Code |
Command line | How to add Visual Studio Code to the PATH |
Need assistance? Check out my discussion board or review the GitHub status page.
© 2023 AppleBoiy • Code of Conduct • [MIT License](LICENSE)