Azure Machine Learning Python Client Library (azureml)

raw JSON →
0.2.7 verified Mon Apr 27 auth: no python deprecated

Legacy Microsoft Azure Machine Learning Python client library (v0.2.7). This package is deprecated and superseded by the Azure ML SDK v2 (`azure-ai-ml`). It interacts with Azure ML workspaces and experiments via the older REST API. Expect no further updates; users should migrate to the modern SDK.

pip install azureml==0.2.7
error AttributeError: module 'azureml' has no attribute 'AzureMLClient'
cause Trying to import from older SDK style or mixed installations.
fix
Ensure you have installed the correct package: pip install azureml==0.2.7 and use 'from azureml import AzureMLClient'.
error ImportError: No module named azureml
cause Package not installed or virtual environment not activated.
fix
Run 'pip install azureml==0.2.7' and verify installation with 'pip list | grep azureml'.
deprecated The azureml package (v0.2.7) is deprecated. All development and bug fixes have ceased. Use the modern Azure ML SDK v2 (`azure-ai-ml`) instead.
fix pip install azure-ai-ml and migrate code to use azure.ai.ml.*
breaking The package name 'azureml' was replaced in later SDK versions. Installing 'azureml' may conflict with newer packages.
fix Uninstall azureml and use azure-ai-ml or azureml-sdk.
gotcha The old client only supports Workspace ID and Authorization Token authentication. It does not support AAD or Managed Identity.
fix Use azure-ai-ml with azure.identity.DefaultAzureCredential() for modern auth.

Creates client and lists experiments. Note: this library is deprecated; use azure-ai-ml for new projects.

from azureml import AzureMLClient
import os

workspace_id = os.environ.get('WORKSPACE_ID', '')
authorization_token = os.environ.get('AUTHORIZATION_TOKEN', '')

if not workspace_id or not authorization_token:
    print('Set WORKSPACE_ID and AUTHORIZATION_TOKEN env vars')
else:
    client = AzureMLClient(workspace_id, authorization_token)
    experiments = client.get_experiments()
    print(experiments)