Skip to content

Commit 5940f33

Browse files
Merge pull request #304024 from MicrosoftDocs/main
Auto Publish – main to live - 2025-08-08 17:00 UTC
2 parents 3a0d455 + 52c8f5a commit 5940f33

14 files changed

+910
-452
lines changed

articles/automation/python-3-packages.md

Lines changed: 30 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Manage Python 3 packages in Azure Automation
33
description: This article tells how to manage Python 3 packages in Azure Automation.
44
services: automation
55
ms.subservice: process-automation
6-
ms.date: 09/10/2024
6+
ms.date: 08/08/2025
77
ms.topic: how-to
88
ms.custom: has-adal-ref, references_regions, devx-track-azurepowershell, devx-track-python
99
ms.service: azure-automation
@@ -17,72 +17,77 @@ This article describes how to import, manage, and use Python 3 packages in Azure
1717

1818
For information on managing Python 2 packages, see [Manage Python 2 packages](./python-packages.md).
1919

20+
21+
> [!NOTE]
22+
> [Python 2.7](https://devguide.python.org/versions/) and [Python 3.8](https://devguide.python.org/versions/) are no longer supported by parent platform Python. We recommend that you create runbooks in Python 3.10 only.
23+
2024
## Default Python packages
2125

2226
To support Python 3.8 runbooks in the Automation service, some Python packages are installed by default and a [list of these packages are here](default-python-packages.md). The default version can be overridden by importing Python packages into your Automation account.
2327

2428
Preference is given to the imported version in your Automation account. To import a single package, see [Import a package](#import-a-package). To import a package with multiple packages, see [Import a package with dependencies](#import-a-package-with-dependencies).
2529

2630
> [!NOTE]
27-
> There are no default packages installed for Python 3.10 (preview).
31+
> There are no default packages installed for Python 3.10.
2832
2933
## Packages as source files
3034

3135
Azure Automation supports only a Python package that only contains Python code and doesn't include other language extensions or code in other languages. However, the Azure Sandbox environment might not have the required compilers for C/C++ binaries, so it's recommended to use [wheel files](https://pythonwheels.com/) instead.
3236

3337
> [!NOTE]
34-
> Currently, Python 3.10 (preview) only supports wheel files.
38+
> Currently, Python 3.10 only supports wheel files.
3539
3640
The [Python Package Index](https://pypi.org/) (PyPI) is a repository of software for the Python programming language. When selecting a Python 3 package to import into your Automation account from PyPI, note the following filename parts:
3741

3842
Select a Python version:
3943

40-
#### [Python 3.8(GA)](#tab/py3)
44+
#### [Python 3.10](#tab/py10)
4145

4246
| Filename part | Description |
4347
|---|---|
44-
|cp38|Automation supports **Python 3.8** for Cloud jobs.|
45-
|amd64|Azure sandbox processes are **Windows 64-bit** architecture.|
48+
|cp310|Automation supports **Python 3.10** for Cloud jobs.|
49+
|manylinux_x86_64|Azure sandbox processes are Linux based 64-bit architecture for Python 3.10 runbooks.
4650

47-
For example:
48-
- To import pandas - select a wheel file with a name similar as `pandas-1.2.3-cp38-win_amd64.whl`.
51+
For example:
52+
- To import pandas - select a wheel file with a name similar as `pandas-1.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl`
4953

50-
Some Python packages available on PyPI don't provide a wheel file. In this case, download the source (.zip or .tar.gz file) and generate the wheel file using `pip`.
54+
Some Python packages available on PyPI don't provide a wheel file. In this case, download the source (.zip or .tar.gz file) and generate the wheel file using pip.
5155

52-
Perform the following steps using a 64-bit Windows machine with Python 3.8.x and wheel package installed:
56+
Perform the following steps using a 64-bit Linux machine with Python 3.10.x and wheel package installed:
5357

54-
1. Download the source file `pandas-1.2.4.tar.gz`.
58+
1. Download the source file `pandas-1.2.4.tar.gz.`
5559
1. Run pip to get the wheel file with the following command: `pip wheel --no-deps pandas-1.2.4.tar.gz`
5660

57-
#### [Python 3.10 (preview)](#tab/py10)
61+
#### [Python 3.8](#tab/py3)
5862

5963
| Filename part | Description |
6064
|---|---|
61-
|cp310|Automation supports **Python 3.10 (preview)** for Cloud jobs.|
62-
|manylinux_x86_64|Azure sandbox processes are Linux based 64-bit architecture for Python 3.10 (preview) runbooks.
65+
|cp38|Automation supports **Python 3.8** for Cloud jobs.|
66+
|amd64|Azure sandbox processes are **Windows 64-bit** architecture.|
6367

64-
For example:
65-
- To import pandas - select a wheel file with a name similar as `pandas-1.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl`
68+
For example:
69+
- To import pandas - select a wheel file with a name similar as `pandas-1.2.3-cp38-win_amd64.whl`.
6670

67-
Some Python packages available on PyPI don't provide a wheel file. In this case, download the source (.zip or .tar.gz file) and generate the wheel file using pip.
71+
Some Python packages available on PyPI don't provide a wheel file. In this case, download the source (.zip or .tar.gz file) and generate the wheel file using `pip`.
6872

69-
Perform the following steps using a 64-bit Linux machine with Python 3.10.x and wheel package installed:
73+
Perform the following steps using a 64-bit Windows machine with Python 3.8.x and wheel package installed:
7074

71-
1. Download the source file `pandas-1.2.4.tar.gz.`
75+
1. Download the source file `pandas-1.2.4.tar.gz`.
7276
1. Run pip to get the wheel file with the following command: `pip wheel --no-deps pandas-1.2.4.tar.gz`
7377

7478
---
7579

7680
## Import a package
7781

82+
To import a package, follow these steps:
83+
7884
1. In your Automation account, select **Python packages** under **Shared Resources**. Then select **+ Add a Python package**.
7985

8086
:::image type="content" source="media/python-3-packages/add-python-3-package.png" alt-text="Screenshot of the Python packages page shows Python packages in the left menu and Add a Python package highlighted.":::
8187

82-
1. On the **Add Python Package** page, select a local package to upload. The package can be **.whl** or **.tar.gz** file for Python 3.8 and **.whl** file for Python 3.10 (preview).
83-
1. Enter a name and select the **Runtime Version** as Python 3.8 or Python 3.10 (preview).
84-
> [!NOTE]
85-
> Currently, Python 3.10 (preview) runtime version is supported for both Cloud and Hybrid jobs in all Public regions except Australia Central2, Korea South, Sweden South, Jio India Central, Brazil Southeast, Central India, West India, UAE Central, and Gov clouds.
88+
1. On the **Add Python Package** page, select a local package to upload. The package can be **.whl** or **.tar.gz** file for Python 3.8 and **.whl** file for Python 3.10.
89+
1. Enter a name and select the **Runtime Version** as Python 3.8 or Python 3.10.
90+
8691
1. Select **Import**.
8792

8893
:::image type="content" source="media/python-3-packages/upload-package.png" alt-text="Screenshot shows the Add Python 3.8 Package page with an uploaded tar.gz file selected.":::
@@ -213,18 +218,16 @@ if __name__ == '__main__':
213218
```
214219
---
215220

216-
#### Importing the script into a runbook
221+
#### Import the script into a runbook
217222
For information on importing the runbook, see [Import a runbook from the Azure portal](manage-runbooks.md#import-a-runbook-from-the-azure-portal). Copy the file from GitHub to storage that the portal can access before you run the import.
218223

219-
> [!NOTE]
220-
> Currently, importing a runbook from Azure Portal isn't supported for Python 3.10 (preview).
221224

222225

223226
The **Import a runbook** page defaults the runbook name to match the name of the script. If you have access to the field, you can change the name. **Runbook type** may default to **Python 2.7**. If it does, make sure to change it to **Python 3.8**.
224227

225228
:::image type="content" source="media/python-3-packages/import-python-3-package.png" alt-text="Screenshot shows the Python 3 runbook import page.":::
226229

227-
#### Executing the runbook to import the package and dependencies
230+
#### Execute the runbook to import the package and dependencies
228231

229232
After creating and publishing the runbook, run it to import the package. See [Start a runbook in Azure Automation](start-runbooks.md) for details on executing the runbook.
230233

0 commit comments

Comments
 (0)