我正在尝试使用Azure-存储-blob与Python一起导入
from azure.storage.blob import BlobServiceClient, BlobClient, ContainerClient并安装在我的.venv中,用pip安装天蓝色存储-blob,在requirements.txt中安装天青存储-blob,这是我的pip环境列表。
Package Version
------------------------- ---------
adal 1.2.7
azure-common 1.1.28
azure-core 1.21.1
azure-cosmos 4.2.0
azure-functions 1.8.0
azure-mgmt-datalake-nspkg 3.0.1
azure-mgmt-nspkg 3.0.2
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-subscription 0.2.0
azure-mgmt-trafficmanager 0.50.0
azure-mgmt-web 0.35.0
azure-nspkg 3.0.2
azure-storage-blob 12.9.0
azure-storage-common 2.1.0
backcall 0.2.0
certifi 2021.10.8
cffi 1.15.0
charset-normalizer 2.0.9
click 8.0.4
colorama 0.4.4
cryptography 36.0.1
cycler 0.11.0
debugpy 1.5.1
decorator 5.1.0
entrypoints 0.3
fonttools 4.28.5
idna 3.3
ipykernel 6.6.0
ipython 7.30.1
isodate 0.6.1
itsdangerous 2.1.0
jedi 0.18.1
Jinja2 3.0.3
jupyter-client 7.1.0
jupyter-core 4.9.1
msrest 0.6.21
msrestazure 0.6.4
nest-asyncio 1.5.4
numpy 1.21.5
oauthlib 3.2.0
packaging 21.3
pandas 1.3.5
parso 0.8.3
pickleshare 0.7.5
Pillow 8.4.0
pip 22.0.3
prompt-toolkit 3.0.24
pycparser 2.21
pydocumentdb 2.3.5
Pygments 2.11.0
PyJWT 2.3.0
pymongo 4.0.1
pyparsing 3.0.6
python-dateutil 2.8.2
python-dotenv 0.19.2
pytz 2021.3
pywin32 303
pyzmq 22.3.0
requests 2.26.0
requests-oauthlib 1.3.1但是我得到导入的"azure.storage.blob“不能解决如何解决这个问题?
更新:它只是在我的.venv中不工作,而且在lib/site-package/azure下没有“存储”文件夹。
发布于 2022-02-28 08:38:17
尝试以下任何一种解决Import "azure.storage.blob" could not be resolved错误的方法:
1.如果您正在使用visual studio代码,请尝试执行以下命令来安装azure-storage-blob
conda install -c anaconda azure conda install -c conda-forge azure-storage-blob 2.卸载旧版本的azure-storage-blob’ and reinstall: pip卸载蔚蓝andpip卸载天青存储
在特定路径重新安装:
cdd .venv
pip install azure-storage –upgrade
参考文献:Unresolved import 'azure.storage.blob' when trying to use Python library azure-storage-blob,How to import Azure BlobService in python?和Install Azure Python api on linux: importError: No module named storage.blob
发布于 2022-02-28 08:58:07
感谢每一个我解决了重新创建.venv的人
https://stackoverflow.com/questions/71284372
复制相似问题