Поделиться через


Install Python in an offline Windows environment

Important

Azure Data Studio is retiring on February 28, 2026. Мы рекомендуем использовать Visual Studio Code. Дополнительные сведения о миграции в Visual Studio Code см. в Что происходит с Azure Data Studio?

This tutorial demonstrates how to install and use the Python kernel in an offline Windows environment with notebooks.

Prerequisites

Download Python and dependencies

  1. On a machine that has internet access, download the latest Azure Data Studio Python package. Unzip the file into a local directory (for example: C:\azuredatastudio-python).

    Note

    The latest Azure Data Studio Python version is 3.8.10.

  2. In a terminal, navigate to the Python directory.

    cd C:\azuredatastudio-python
    
  3. Create a text file named requirements.txt with the following contents.

    pandas>=0.24.2
    jupyter>=1.0.0
    sparkmagic>=0.12.9
    powershell-kernel>=0.1.3
    
  4. Create a sub directory named wheelhouse.

    mkdir wheelhouse
    
  5. Run the following command to download the required dependencies to the sub directory.

    python.exe -m pip download -r requirements.txt -d wheelhouse
    

Note

Check to make sure you have the latest pip version installed. If you aren't sure, you can upgrade it by running the following command: C:\azuredatastudio-python\python.exe -m pip install --upgrade pip.

Install Python on a machine that doesn't have internet access

  1. On a machine that doesn't have internet access, copy the Python folder to a local directory (for example: C:\azuredatastudio-python).

  2. In a terminal, navigate to the Python folder.

    cd C:\azuredatastudio-python
    
  3. Run the following to install the dependencies.

    python.exe -m pip install -r requirements.txt --no-index --find-links wheelhouse
    

Use the Python Installation in Azure Data Studio

  1. Open Azure Data Studio
  2. From the Command Palette, search for Configure Python for Notebooks.
  3. In the Configure Python for Notebooks wizard, select Use existing Python installation, and browse to the installed Python location (for example: C:\azuredatastudio-python).

Once the wizard is completed, open a new notebook and change the kernel to Python.