BlobServiceClient ImportError: cannot import name 'ParamSpec' from 'typing_extensions'
See original GitHub issue- Package Name: azure.storage.blob
- Package Version: 12.10.0
- Operating System: Azure Databricks Cluster, DataBricks Runtime 10.3 ML
- Python Version: 3.8
Describe the bug
An ImportError from typing_extensions package shows up when I run from azure.storage.blob import BlobServiceClient
. I run the commands from a Notebook inside the Azure Databricks cluster.
To Reproduce Steps to reproduce the behavior:
- start up a VM with Python3.8 and create a new notebook.
- create a new cell and run
! pip3 install azure-storage-blob
- create a new cell and run
from azure.storage.blob import BlobServiceClient
Expected behavior Be able to import and use the package without any import errors from typing_extensions or any other dependent package.
Screenshots Adding some screenshots of the stack trace


Additional context I fixed the problem in one notebook by doing
%rm -r /databricks/python3/lib/python3.8/site-packages/typing_extensions-4.1.1.dist-info /databricks/python3/lib/python3.8/site-packages/typing_extensions.py
This did not work on a second notebook where I tried it.
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:17 (9 by maintainers)
Top Results From Across the Web
Cannot import name 'ParamSpec' from 'typing_extensions'
The "ImportError: cannot import name 'ParamSpec' from 'typing_extensions'" occurs when we have an outdated version of the typing-extensions ...
Read more >No Module named 'typing_extensions' 'from azure.storage ...
I have installed and uninstalled azure.storage.blob multiple times, but this error persist. I have also tried installing typing-extensions ...
Read more >cannot import name 'paramspec' from 'typing_extensions ...
Describe the bug An ImportError from typing_extensions package shows up when I run from azure.storage.blob import BlobServiceClient . I run the commands from...
Read more >ImportError: cannot import name 'ParamSpec' from ... - Ray
Hello. I'm having a bit of trouble getting the cluster to work on Azure. The cluster is created successfully and I can attach...
Read more >PIP library won't load in 2021.1.2 - NVIDIA Developer Forums
... 14:42:42 [Error] [omni.ext.impl.custom_importer] Failed to import python module myplugin.test.ext. Error: cannot import name 'ParamSpec' ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
That seems to have resolved it. I can’t call reload(typing_extensions) or it seems to reset some things. But, it is loading the azure python and pip packages now… awesome! Thank you!!
@xiaoyongzhu moving the chat from the PR to this issue:
@xiaoyongzhu thanks for bringing to my attention, as it is still an issue I’m going to re-open this. Can you provide more details on how to set up your Databricks environment? I had previously tried to repro this error in a Databricks notebook with no luck (see above). Are you running this in a notebook? Also which version of
typing-extensions
is getting installed?typing.ParamSpec
was added in Python 3.10, buttyping-extensions
should backport it to as early as 3.6 (looks like you’re using 3.8). While this import works outside of Databricks, I’ll need to investigate why it’s a problem in the Databricks runtime and follow up with the service team.