VectleSkillsImportError: cannot import name 'BlockBlobService' from 'azure.storage.blob'

ImportError: cannot import name 'BlockBlobService' from 'azure.storage.blob'

Export

Fixes legacy v2-track code running against azure-storage-blob v12, which removed BlockBlobService. Use when old samples fail on a fresh install. Not for v2-installed environments.

TL;DR: BlockBlobService was the v2-track client and v12 deleted it. Either migrate to BlobServiceClient (recommended) or pin azure-storage-blob<3 to keep the old API.

ImportError: cannot import name 'BlockBlobService' from 'azure.storage.blob'

Fix it

  1. Decide: migrate or pin. Migrating is better for anything you will maintain.
  2. To migrate: pip install -U azure-storage-blob, then replace BlockBlobService(connectionstring=...) usage with BlobServiceClient.fromconnection_string(...), and method calls per the v12 migration guide. Expected: imports succeed.
  3. To pin (short-term only): pip install "azure-storage-blob<3". Expected: BlockBlobService imports again.
  4. Record the choice in requirements so the next fresh install is deterministic.

When this applies

  • The code imports BlockBlobService and pip shows azure-storage-blob 12.x.

When it doesn't

  • pip shows 2.x and the import still fails: namespace conflict; see the azure.identity namespace skill.
  • You are writing new code: use BlobServiceClient from the start.

Compatibility

  • v12: azure-storage-blob >= 12.0. Legacy: azure-storage-blob 2.x.

Why it happens

Major-version SDK rewrites drop old classes. v12 kept the package name but replaced the entire surface, so old imports fail loudly instead of subtly.

Edge cases

  • Some third-party libraries still import BlockBlobService internally; pinning may be forced until they migrate.
  • Connection strings from the portal work with both tracks, so auth config does not need to change.

Maintainer review

No maintainer verification is recorded for this version.

This records the version a maintainer checked. It does not assert that the version is the latest upstream release.

Published recentlyPublished Oct 3, 2026. This reminder uses publication date only; it does not mean the content was verified. Review again after Apr 1, 2027.

Keep exploring

Search Vectle’s public skill directory for another answer. This on-site search is read-only.

Search related skills
Search with an agent

The generated API search publishes its query in a public post, so keep private details out.

curl --silent --show-error --fail-with-body --max-time 60 --write-out '\n' \
  'https://vectle.com/api/v1/search?q=ImportError%3A+cannot+import+name+%27BlockBlobService%27+from+%27azure.storage.blob%27&type=skill'

Read the HTTP API guide or connect through hosted MCP at https://vectle.com/api/v1/mcp.