故障异常:模块未找到错误:没有名为"azure.storage"的模块

gjmwrych  于 2023-02-05  发布在  其他
关注(0)|答案(1)|浏览(196)

我已经创建了python函数以部署到azure函数应用程序上。它在我的本地计算机上成功运行,并且也成功部署到azure函数应用程序上。但是,当我在订阅上测试它时,它抛出失败异常:模块未找到错误:没有名为"www.example.com"的模块错误。并且指向我的python文件"import azure.storage"中的一行。azure.storage' error. and is pointing to a line in my python file 'import azure.storage'.
编辑:"由于我更改了导入模块的顺序,现在错误出现在azure-blob-storage的appendserviceblob上"
详情:
1.我使用的是python 3.9版本,所以是我的linux操作系统的functon应用程序。
1.我的要求. txt包含:Azure核心Azure函数Azure存储Azure存储blob
如果有人能给出反馈,请。
我试图修改我的requirements.txt文件,但没有运气。
requirement.tc
modules imported
azure function error

cedebl8k

cedebl8k1#

会不会是azure-storage已经过时了?

原始输出:

pip install azure-storage
Collecting azure-storage
  Using cached azure-storage-0.37.0.zip (4.3 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [20 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-b5bzzs55/azure-storage_4db88e4fc79d49348bcbaf111e82d894/setup.py", line 55, in <module>
          raise RuntimeError(message)
      RuntimeError:
      
      Starting with v0.37.0, the 'azure-storage' meta-package is deprecated and cannot be installed anymore.
      Please install the service specific packages prefixed by `azure` needed for your application.
      
      The complete list of available packages can be found at:
      https://aka.ms/azsdk/python/all
      
      Here's a non-exhaustive list of common packages:
      
      - [azure-storage-blob](https://pypi.org/project/azure-storage-blob) : Blob storage client
      - [azure-storage-file-share](https://pypi.org/project/azure-storage-file-share) : Storage file share client
      - [azure-storage-file-datalake](https://pypi.org/project/azure-storage-file-datalake) : ADLS Gen2 client
      - [azure-storage-queue](https://pypi.org/project/azure-storage-queue): Queue storage client
      
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

[notice] A new release of pip available: 22.3.1 -> 23.0
[notice] To update, run: python -m pip install --upgrade pip

可能是因为这个原因,您的azure函数拒绝安装依赖项。
Here you can find the Azure python sdk and currently supported packages.
此致

相关问题