Dvc: No module named 'azure.core'

Created on 3 Sep 2020  路  3Comments  路  Source: iterative/dvc

Bug Report

We're using DVC installed with pip on Ubuntu 20.04.
We have a local cache and a remote on Azure blob storage.

On version 1.5.x till 1.6.6, we're experiencing this error while trying to use dvc push.

ERROR: unexpected error - No module named 'azure.core'

We've tried to install azure-core package using pip, but this basically installs an incompatible version with DVC.
Downgrading to 1.3.1 solves the issue.

Please provide information about your setup

Running DVC from version 1.5 to 1.6.6 gives the same error.
Ubuntu 20.04

awaiting response

Most helpful comment

Hi @dean-sh, you most likely need to upgrade the azure-storage-blob pip package (which should then install the correct version of azure-core).

In DVC 1.5, the required azure dependency was changed to require azure-storage-blob >= 12.0, previously we required azure-storage-blob==2.1.0. You should be able to check which version you have installed with

pip freeze | grep azure-storage-blob

edit: note that when you use pip install --upgrade dvc it will only upgrade the core DVC package, and not the relevant remote dependencies. To get the desired behavior to keep the remote-related dependencies up to date as well as core DVC, you need to do
pip install --upgrade dvc[azure] (or dvc[all]).

All 3 comments

Hi @dean-sh, you most likely need to upgrade the azure-storage-blob pip package (which should then install the correct version of azure-core).

In DVC 1.5, the required azure dependency was changed to require azure-storage-blob >= 12.0, previously we required azure-storage-blob==2.1.0. You should be able to check which version you have installed with

pip freeze | grep azure-storage-blob

edit: note that when you use pip install --upgrade dvc it will only upgrade the core DVC package, and not the relevant remote dependencies. To get the desired behavior to keep the remote-related dependencies up to date as well as core DVC, you need to do
pip install --upgrade dvc[azure] (or dvc[all]).

Hey,
Thanks for the assistance - solved our issue.

Upgrading with pip install --upgrade dvc[azure] was the trick - I was wondering why the azure dependency wasn't upgraded with DVC itself.

Do you think you could add this to the documentation?

@dean-sh Totally! We have a ticket for it https://github.com/iterative/dvc.org/issues/702 . Thank you for the feedback!

Was this page helpful?
0 / 5 - 0 ratings