Registry /
azure / azure-mgmt-datalake-store
Install & Compatibility
Where this runs
tested against v0.5.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.974s · 45.2MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 4.0s · import 0.902s · 46MB
44MB installed
● package 44MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
DataLakeStoreAccountManagementClient
✓ from azure.mgmt.datalake.store import DataLakeStoreAccountManagementClient
This quickstart demonstrates how to initialize the `DataLakeStoreAccountManagementClient` and attempt to list Data Lake Store accounts within your Azure subscription. Due to the retirement of the underlying service, this code is primarily for understanding legacy interactions and will likely result in errors.
import os
from azure.identity import DefaultAzureCredential
from azure.mgmt.datalake.store import DataLakeStoreAccountManagementClient
# NOTE: Azure Data Lake Store Gen1 service was retired on February 29, 2024.
# This code will likely fail unless you are interacting with a pre-existing,
# legacy resource which might still be minimally accessible.
# For new development, consider Azure Data Lake Storage Gen2 with azure-mgmt-storage or azure-storage-blob.
# Your Azure subscription ID
subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "YOUR_SUBSCRIPTION_ID")
if not subscription_id or subscription_id == "YOUR_SUBSCRIPTION_ID":
raise ValueError("Please set the AZURE_SUBSCRIPTION_ID environment variable.")
# Authenticate with Azure. DefaultAzureCredential attempts various methods (e.g., Azure CLI, environment variables).
# While DefaultAzureCredential is a modern 'Track 2' credential, it can often work with 'Track 1' management clients.
credential = DefaultAzureCredential()
# Create the Data Lake Store management client
client = DataLakeStoreAccountManagementClient(credential, subscription_id)
print("Attempting to list Data Lake Store accounts (Note: Service retired 2024-02-29):")
try:
# List Data Lake Store accounts in the subscription
accounts = client.account.list()
found_accounts = False
for account in accounts:
print(f" Account Name: {account.name}, Location: {account.location}, Provisioning State: {account.provisioning_state}")
found_accounts = True
if not found_accounts:
print(" No Data Lake Store accounts found in this subscription.")
except Exception as e:
print(f"An error occurred while listing accounts: {e}")
print("This is expected behavior as the Azure Data Lake Store Gen1 service is retired.")
print("You may receive errors such as 'ResourceNotFound' or 'BadRequest'.")
print("\nRecommendation: Migrate to Azure Data Lake Storage Gen2 using the azure-mgmt-storage or azure-storage-blob libraries.")
Debug
Known issues
breakingThe Azure Data Lake Store Gen1 service, which this library manages, was officially retired on February 29, 2024. Operations against the service will fail. This is the most critical issue.fixMigrate your data and applications to Azure Data Lake Storage Gen2 (part of Azure Storage). Use `azure-mgmt-storage` for management and `azure-storage-blob` for data operations with Gen2.
affects: All versions of the service and library
deprecatedThis Python library is an older 'Track 1' SDK for Azure and is no longer actively maintained. Its last release was in 2017. It is superseded by newer, modular 'Track 2' Azure SDKs.fixFor new development, use modern Azure SDKs (e.g., `azure-mgmt-storage` for management, `azure-storage-blob` for data) which follow the 'Track 2' design guidelines and are actively maintained.
affects: All versions (0.5.0 is the latest)
gotchaDue to its age, this library might have compatibility issues with very recent Python versions or depend on older versions of common Azure dependencies. While `DefaultAzureCredential` from `azure.identity` can often work, it's a modern (Track 2) credential type used with an old (Track 1) client, which can sometimes lead to unexpected behavior.fixEnsure your Python environment uses versions compatible with a 2017-era library (e.g., Python 3.6 or older might be more reliable, though often 3.7+ works with caveats). For authentication with Track 1 SDKs, legacy methods like `ServicePrincipalCredentials` from `azure.common.credentials` might be more 'native', but less secure/convenient than modern `azure.identity`.
affects: 0.5.0
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'azure.mgmt.datalake.store'
The `azure-mgmt-datalake-store` package is not installed in the current Python environment, or there is an issue with the Python path or virtual environment activation.
fixEnsure the package is installed using `pip install azure-mgmt-datalake-store`. If using virtual environments, activate the correct environment before running the code. Also, check for conflicts if other `azure` packages are installed (e.g., uninstall `azure` meta-package if it's an old version).
AttributeError: 'DefaultAzureCredential' object has no attribute 'signed_session'
The `azure-mgmt-datalake-store` library is an older 'Track 1' Azure SDK and is not compatible with the `DefaultAzureCredential` from the newer 'Track 2' `azure-identity` library, which provides modern credential management.
fixUse an authentication method compatible with 'Track 1' SDKs, such as `ApplicationTokenCredentials` or `ServicePrincipalCredentials` from `msrestazure.azure_active_directory`. Alternatively, consider migrating to Azure Data Lake Storage Gen2 and using the actively maintained `azure-storage-file-datalake` library with `DefaultAzureCredential`.
AttributeError:'azure.datalake.store.lib' does not have the attribute 'auth'
This error typically occurs when there's a breaking change in the `azure-datalake-store` library's internal authentication module, specifically affecting how authentication objects are accessed (e.g., after version 1.0.1).
fixAdjust the code to use the correct and current authentication methods exposed by the `azure-datalake-store` library. This often involves directly creating and passing credential objects rather than accessing a removed `auth` attribute. If a specific older version of the library is required, pin that version in your `requirements.txt`.
CloudError: Azure Error: InvalidAuthenticationTokenTenant. Message: The access token is from the wrong issuer 'https://sts.windows.net/...'. It must match the tenant 'https://sts.windows.net/.../' associated with this subscription.
The credentials used for authentication (e.g., Service Principal or user account) are from an Azure Active Directory tenant that does not match the tenant associated with the Azure subscription where the Data Lake Store Gen1 account is located.
fixVerify that the `AZURE_TENANT_ID` environment variable or the tenant ID provided during credential creation correctly matches the tenant ID of the subscription where the Data Lake Store Gen1 resource exists. Ensure the authenticated identity has the necessary permissions within that tenant and subscription.
WARNING: The candidate selected for download or install is a yanked version: 'azure-mgmt-datalake-store' candidate (version 1.0.0 at ... Reason for being yanked: Retiring this version of the SDK.)
Version 1.0.0 of `azure-mgmt-datalake-store` was deliberately removed (yanked) from PyPI because it's an older, retired version of the SDK for a service that is no longer maintained.
fixAvoid installing version 1.0.0. If you need to use this specific 'Track 1' library, install the last stable release, which is 0.5.0 (`pip install azure-mgmt-datalake-store==0.5.0`). However, it is strongly recommended to migrate to Azure Data Lake Storage Gen2 and use the `azure-storage-file-datalake` library.
Upgrade
Version history
0.5.0latest on PyPI · released Jun 14, 2018
Audit
Dependencies
azure-commonrequiredCommon Azure utilities and base classes for older SDKs.
msrestazurerequiredMicrosoft Azure Autorest-generated REST client runtime for older SDKs.
azure-mgmt-nspkgrequiredNamespace package for older Azure management SDKs.