Hi,
I have trouble importing BlobServiceClient in my Databrick's notebook. I have the error message :
ImportError: cannot import name 'BlobServiceClient' from 'azure.storage.blob' (/databricks/python/lib/python3.7/site-packages/azure/storage/blob/__init__.py)
Here is the result of my pip freeze :
adal==1.2.2
aiohttp==3.6.2
alembic==1.4.1
apache-airflow==1.10.9
apispec==1.3.3
argcomplete==1.11.1
asn1crypto==1.3.0
async-timeout==3.0.1
attrs==19.3.0
azure-applicationinsights==0.1.0
azure-batch==4.1.3
azure-common==1.1.24
azure-core==1.2.2
azure-cosmosdb-nspkg==2.0.2
azure-cosmosdb-table==1.0.6
azure-datalake-store==0.0.48
azure-eventgrid==1.3.0
azure-graphrbac==0.40.0
azure-keyvault==1.1.0
azure-loganalytics==0.1.0
azure-mgmt==4.0.0
azure-mgmt-advisor==1.0.1
azure-mgmt-applicationinsights==0.1.1
azure-mgmt-authorization==0.50.0
azure-mgmt-batch==5.0.1
azure-mgmt-batchai==2.0.0
azure-mgmt-billing==0.2.0
azure-mgmt-cdn==3.1.0
azure-mgmt-cognitiveservices==3.0.0
azure-mgmt-commerce==1.0.1
azure-mgmt-compute==4.6.2
azure-mgmt-consumption==2.0.0
azure-mgmt-containerinstance==1.5.0
azure-mgmt-containerregistry==2.8.0
azure-mgmt-containerservice==4.4.0
azure-mgmt-cosmosdb==0.4.1
azure-mgmt-datafactory==0.6.0
azure-mgmt-datalake-analytics==0.6.0
azure-mgmt-datalake-nspkg==3.0.1
azure-mgmt-datalake-store==0.5.0
azure-mgmt-datamigration==1.0.0
azure-mgmt-devspaces==0.1.0
azure-mgmt-devtestlabs==2.2.0
azure-mgmt-dns==2.1.0
azure-mgmt-eventgrid==1.0.0
azure-mgmt-eventhub==2.6.0
azure-mgmt-hanaonazure==0.1.1
azure-mgmt-iotcentral==0.1.0
azure-mgmt-iothub==0.5.0
azure-mgmt-iothubprovisioningservices==0.2.0
azure-mgmt-keyvault==1.1.0
azure-mgmt-loganalytics==0.2.0
azure-mgmt-logic==3.0.0
azure-mgmt-machinelearningcompute==0.4.1
azure-mgmt-managementgroups==0.1.0
azure-mgmt-managementpartner==0.1.1
azure-mgmt-maps==0.1.0
azure-mgmt-marketplaceordering==0.1.0
azure-mgmt-media==1.0.0
azure-mgmt-monitor==0.5.2
azure-mgmt-msi==0.2.0
azure-mgmt-network==2.7.0
azure-mgmt-notificationhubs==2.1.0
azure-mgmt-nspkg==3.0.2
azure-mgmt-policyinsights==0.1.0
azure-mgmt-powerbiembedded==2.0.0
azure-mgmt-rdbms==1.9.0
azure-mgmt-recoveryservices==0.3.0
azure-mgmt-recoveryservicesbackup==0.3.0
azure-mgmt-redis==5.0.0
azure-mgmt-relay==0.1.0
azure-mgmt-reservations==0.2.1
azure-mgmt-resource==2.2.0
azure-mgmt-scheduler==2.0.0
azure-mgmt-search==2.1.0
azure-mgmt-servicebus==0.5.3
azure-mgmt-servicefabric==0.2.0
azure-mgmt-signalr==0.1.1
azure-mgmt-sql==0.9.1
azure-mgmt-storage==2.0.0
azure-mgmt-subscription==0.2.0
azure-mgmt-trafficmanager==0.50.0
azure-mgmt-web==0.35.0
azure-nspkg==3.0.2
azure-servicebus==0.21.1
azure-servicefabric==6.3.0.0
azure-servicemanagement-legacy==0.20.6
azure-storage==0.36.0
azure-storage-blob==12.2.0
azure-storage-common==1.4.2
azure-storage-file==1.4.0
azure-storage-queue==1.4.0
Babel==2.8.0
backcall==0.1.0
bcrypt==3.1.7
boto==2.49.0
boto3==1.9.162
botocore==1.12.163
cached-property==1.5.1
cattrs==0.9.0
certifi==2019.3.9
cffi==1.12.2
chardet==3.0.4
Click==7.0
colorama==0.4.3
colorlog==4.0.2
configparser==3.5.3
croniter==0.3.31
cryptography==2.6.1
cycler==0.10.0
Cython==0.29.6
decorator==4.4.0
defusedxml==0.6.0
dill==0.3.1.1
docutils==0.14
Flask==1.1.1
Flask-Admin==1.5.4
Flask-AppBuilder==2.2.4
Flask-Babel==1.0.0
Flask-Caching==1.3.3
Flask-JWT-Extended==3.24.1
Flask-Login==0.4.1
Flask-OpenID==1.2.5
Flask-SQLAlchemy==2.4.1
flask-swagger==0.2.13
Flask-WTF==0.14.3
funcsigs==1.0.2
future==0.16.0
graphviz==0.13.2
gunicorn==19.10.0
idna==2.8
ijson==2.6.1
importlib-metadata==1.5.0
ipykernel==5.1.0
ipython==7.4.0
ipython-genutils==0.2.0
iso8601==0.1.12
isodate==0.6.0
itsdangerous==1.1.0
jedi==0.13.3
Jinja2==2.10.3
jmespath==0.9.4
json-merge-patch==0.2
jsonschema==3.2.0
jupyter-client==5.2.4
jupyter-core==4.4.0
kiwisolver==1.1.0
lazy-object-proxy==1.4.3
lockfile==0.12.2
Mako==1.1.2
Markdown==2.6.11
MarkupSafe==1.1.1
marshmallow==2.19.5
marshmallow-enum==1.5.1
marshmallow-sqlalchemy==0.22.3
matplotlib==3.0.3
msrest==0.6.11
msrestazure==0.6.2
multidict==4.7.5
numpy==1.16.2
oauthlib==3.1.0
oscrypto==1.2.0
pandas==0.24.2
paramiko==2.7.1
parso==0.3.4
patsy==0.5.1
pendulum==1.4.4
pexpect==4.6.0
pickleshare==0.7.5
prison==0.1.2
prompt-toolkit==2.0.9
psutil==5.7.0
psycopg2==2.7.6.1
ptyprocess==0.6.0
pyarrow==0.13.0
pycparser==2.19
pycryptodomex==3.9.7
pycurl==7.43.0
Pygments==2.3.1
pygobject==3.20.0
PyJWT==1.7.1
PyNaCl==1.3.0
pyOpenSSL==19.0.0
pyparsing==2.4.6
pyrsistent==0.15.7
PySocks==1.6.8
python-apt==1.1.0b1+ubuntu0.16.4.5
python-daemon==2.1.2
python-dateutil==2.8.0
python-editor==1.0.4
python3-openid==3.1.0
pytz==2018.9
pytzdata==2019.3
PyYAML==5.3
pyzmq==18.0.0
requests==2.21.0
requests-oauthlib==1.3.0
s3transfer==0.2.1
scikit-learn==0.20.3
scipy==1.2.1
seaborn==0.9.0
setproctitle==1.1.10
simplejson==3.17.0
six==1.12.0
smart-open==1.9.0
snowflake-connector-python==2.2.1
SQLAlchemy==1.3.13
SQLAlchemy-JSONField==0.9.0
SQLAlchemy-Utils==0.36.1
ssh-import-id==5.5
statsmodels==0.9.0
tabulate==0.8.6
tenacity==4.12.0
termcolor==1.1.0
text-unidecode==1.2
thrift==0.13.0
tornado==6.0.2
traitlets==4.3.2
typing-extensions==3.7.4.1
tzlocal==1.5.1
unattended-upgrades==0.1
unicodecsv==0.14.1
urllib3==1.24.1
virtualenv==16.4.1
wcwidth==0.1.7
Werkzeug==0.16.1
WTForms==2.2.1
yarl==1.4.2
zipp==3.1.0
zope.deprecation==4.4.0
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @xgithubtriage
@xiafu-msft please take a look.
Hi @arbatazi
It looks like you didn't install that properly.
Would you like to create a new virtual environment and just do
pip install azure-storage-blob
Feel free to let me know if it's still not working or you need any info!
@xiafu-msft I was getting the same error before and went through the trouble of deleting my old environment and creating an environment from scratch. I installed azure and then installed azure-storage-blob and I'm still getting this error.
It worked after I uninstalled azure. For whatever crazy reason, the azure package requires azure-storage-blob version 1.{something}
It looks like you didn't install that properly.
Would you like to create a new virtual environment and just do
pip install azure-storage-blob
Feel free to let me know if it's still not working or you need any info!
Hi @jorgeso
Thanks for reaching out.
Please follow this to reinstall you azure-storage-blob. Don't install azure! ^_^
What is the correct set of steps to correct this issue?
$ pip freeze | grep azure
azure-common==1.1.24
azure-core==1.4.0
azure-mgmt-subscription==0.5.0
azure-nspkg==3.0.2
azure-storage-blob==12.3.0
azure-storage-common==2.1.0
msrestazure==0.6.3
Ran into this problem multiple times,
make sure to check if your default python version matches the pip's default python version.
And then doing the uninstall-install cycle works. i.e.
to have pip install to the same version as the default python version, we do:
python -m pip uninstall azure-common
python -m pip uninstall azure-storage
python -m pip uninstall azure-nspkg
python -m pip uninstall azure-storage-blob
and finally just
python -m pip install azure-storage-blob
Hope it helps!
Yes, there are onerous workarounds that should not be necessary at all. This should be corrected by the package maintainers.
Hi @hapticPaper
Thanks for reaching out and the feedback!
Were you using azure-storage-blob<=2.1.0 and you upgraded to 12.3.0, is it correct?
Having this issue in a big way. Unable to fix it with reinstallation or new environments. Agreed that this is a huge gotcha which should be handled by package maintainers.
Most helpful comment
Having this issue in a big way. Unable to fix it with reinstallation or new environments. Agreed that this is a huge gotcha which should be handled by package maintainers.