How to import Azure BlobService in python?

前端 未结 4 1137
名媛妹妹
名媛妹妹 2020-12-06 10:00

We are able to import azure.storage, but not access the BlobService attribute

The documentation says to use the following import statement:

from azur         


        
4条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-06 10:39

    I had version 1.0.3 installed (which includes azure.storage version 0.20) on Ubuntu server 16.04 LTS and pip only reinstalled version 0.20 of azure.storage when I uninstalled and reinstalled the azure package. This was according to the pypi page for the azure package v. 2.0.0rc6 which recommends that to upgrade from 1.0.3 to version 2 you should do

    sudo pip3 uninstall azure
    sudo pip3 install azure
    

    pypi/azure

    Instead, this worked for me,

    sudo pip3 uninstall azure
    sudo pip3 install azure==2.0.0rc6
    

提交回复
热议问题