apache/beam · critical · RuntimeError
Azure dependencies are not installed. Unable to run.
Error message
Azure dependencies are not installed. Unable to run.
What it means
BlobStorageIO.__init__() checks the module-level AZURE_DEPS_INSTALLED flag, which is set at import time based on whether azure-storage-blob (and related packages) are importable. If they are absent it raises RuntimeError('Azure dependencies are not installed. Unable to run.'), because the class cannot function without the Azure SDK.
Source
Thrown at sdks/python/apache_beam/io/azure/blobstorageio.py:124
class BlobStorageIO(object):
"""Azure Blob Storage I/O client."""
def __init__(self, client=None, pipeline_options=None):
if client is None:
azure_options = pipeline_options.view_as(AzureOptions)
connect_str = azure_options.azure_connection_string or \
os.getenv('AZURE_STORAGE_CONNECTION_STRING')
if connect_str:
self.client = BlobServiceClient.from_connection_string(
conn_str=connect_str)
else:
credential = auth.get_service_credentials(pipeline_options)
self.client = BlobServiceClient(
account_url=azure_options.blob_service_endpoint,
credential=credential)
else:
self.client = client
if not AZURE_DEPS_INSTALLED:
raise RuntimeError('Azure dependencies are not installed. Unable to run.')
def open(
self,
filename,
mode='r',
read_buffer_size=DEFAULT_READ_BUFFER_SIZE,
mime_type='application/octet-stream'):
"""Open an Azure Blob Storage file path for reading or writing.
Args:
filename (str): Azure Blob Storage file path in the form
``azfs://<storage-account>/<container>/<path>``.
mode (str): ``'r'`` for reading or ``'w'`` for writing.
read_buffer_size (int): Buffer size to use during read operations.
mime_type (str): Mime type to set for write operations.
Returns:
Azure Blob Storage file object.View on GitHub (pinned to 12126d8942)
Solutions
- Install the Azure extra: pip install 'apache-beam[azure]' (or pip install azure-storage-blob azure-azure-identity as required by your Beam version)
- Verify with python -c "from apache_beam.io.azure import blobstorageio; print(blobstorageio.AZURE_DEPS_INSTALLED)" that the flag is True in the target environment
- Rebuild Docker images / requirements files to include the Azure extra for all workers
- If version conflicts occur, align azure-storage-blob with the version pinned by your apache-beam release
Example fix
// before pip install apache-beam // after pip install 'apache-beam[azure]'
Defensive patterns
Strategy: validation
Validate before calling
from apache_beam.io.azure import blobstorageio
if not blobstorageio.AZURE_DEPS_INSTALLED:
raise RuntimeError("Install Azure deps: pip install 'apache-beam[azure]'") Type guard
def azure_available():
try:
import azure.storage.blob # noqa: F401
return True
except ImportError:
return False Try / catch
try:
io = blobstorageio.BlobStorageIO(azure_options)
except RuntimeError as e:
if 'Azure dependencies' in str(e):
raise SystemExit("Azure SDK missing; install apache-beam[azure] in this environment")
raise Prevention
- Install apache-beam with the [azure] extra in all environments (dev, CI, workers, Docker images)
- Assert AZURE_DEPS_INSTALLED at pipeline startup with a clear fail-fast message
- Pin azure-storage-blob to the version your apache-beam release expects
- Keep requirements/container images for Azure jobs separate from GCS/S3-only jobs to avoid dependency pruning
When it happens
Trigger: Instantiating BlobStorageIO (directly or via BlobStorageFileSystem operations like open/exists/delete) in an environment where apache-beam was installed without the gcp/azure extras and azure-storage-blob, azure-identity, etc. are not installed.
Common situations: Installing plain `apache-beam` instead of `apache-beam[azure]`; running in slim Docker images or Airflow workers without the Azure extra; CI environments where dependencies were pruned; version drift after upgrading apache-beam that requires newer azure-storage-blob versions.
Understand the failure class
Background: "not installed", "pip install", "required for": how missing-dependency errors surface across open-source libraries — this error's family across 34 libraries.
Related errors
- This pipeline contains a DillCoder which requires the dill p
- Unable to rename unequal number of sources and destinations.
- Rename operation failed.
- Exists operation failed
- Size operation failed
AI-assisted analysis of apache/beam@12126d8942 (2026-09-13).
Data as JSON: /api/errors/a7acfd4fc7800dcf.
Report an issue: GitHub.