Link Search Menu Expand Document

Table of contents

  1. Install Python on macOS or Windows

python_logo

Install Python on macOS or Windows

We will use Python 3 which is the latest Python version. If you have already installed Python 3, please skip this section. If you have Python 2 in your machine, please upgrade to Python 3.

  1. Click the following link to visit the Python Downloads page https://www.python.org/downloads/

    Under the Downloads dropdown list, select the OS

  2. Click the downloading link based on the operating system you are using:

    python_download_page

Note: While creating this document the latest version was 3.10.4. You might see a newer version β€” download the latest.

  1. Perform the installation process:

Click on Download Python 3.x (you might see a different version). If you are using Windows, an .exe file will be downloaded. If you are using macOS, a .pkg file will be downloaded. After downloading the file, follow the on-screen instructions to install Python.

  1. After the installation, open Visual Studio Code. Then open the terminal (View β†’ Terminal). Type the following command to test your Python version:

    $ python3 --version
    

    python_version_output

    Note: you are supposed to see the Python version (it may be slightly different from the version shown here, but it should be 3.x.x).

  2. The Python extension is also recommended in VS Code.

    Open View β†’ Extensions in the VS Code menu.

    vscode_view_dropdown_menu

Search for β€œPython” and click Install on the right. ext_search_result


^
TOP

Copyright @ 2025 CityU STC