python - 如何修复“ModuleNotFoundError:没有名为 'azure.storage'\r 的模块”
问题描述
尝试在 azure windows 服务器上运行项目时出现此错误,但它在 Ubuntu 机器和我的本地 Windows 机器上运行良好。我已经使用 mod_wsgi 服务器在 Apache 上部署了烧瓶项目。我已经安装了所有必需的依赖项。
[Thu Feb 18 09:03:58.636970 2021] [wsgi:error] [pid 5724:tid 1120] [client 110.225.67.165:26675] mod_wsgi (pid=5724): Failed to exec Python script file 'C:/Users/user/Desktop/flask/app/src/app.wsgi'.
[Thu Feb 18 09:03:58.636970 2021] [wsgi:error] [pid 5724:tid 1120] [client 110.225.67.165:26675] mod_wsgi (pid=5724): Exception occurred processing WSGI script 'C:/Users/user/Desktop/flask/app/src/app.wsgi'.
[Thu Feb 18 09:03:58.636970 2021] [wsgi:error] [pid 5724:tid 1120] [client 110.225.67.165:26675] Traceback (most recent call last):\r
[Thu Feb 18 09:03:58.636970 2021] [wsgi:error] [pid 5724:tid 1120] [client 110.225.67.165:26675] File "C:/Users/user/Desktop/flask/app/src/app.wsgi", line 4, in <module>\r
[Thu Feb 18 09:03:58.636970 2021] [wsgi:error] [pid 5724:tid 1120] [client 110.225.67.165:26675] from wsgi import app as application\r
[Thu Feb 18 09:03:58.636970 2021] [wsgi:error] [pid 5724:tid 1120] [client 110.225.67.165:26675] File "C:\\Users\\user\\Desktop\\flask\\app\\src\\wsgi.py", line 6, in <module>\r
[Thu Feb 18 09:03:58.636970 2021] [wsgi:error] [pid 5724:tid 1120] [client 110.225.67.165:26675] from server import app\r
[Thu Feb 18 09:03:58.636970 2021] [wsgi:error] [pid 5724:tid 1120] [client 110.225.67.165:26675] File "C:\\Users\\user\\Desktop\\flask\\app\\src\\server.py", line 10, in <module>\r
[Thu Feb 18 09:03:58.636970 2021] [wsgi:error] [pid 5724:tid 1120] [client 110.225.67.165:26675] from azure_portal.blob_storage import BlobStorage\r
[Thu Feb 18 09:03:58.636970 2021] [wsgi:error] [pid 5724:tid 1120] [client 110.225.67.165:26675] File "C:\\Users\\user\\Desktop\\flask\\app\\src\\azure_portal\\blob_storage.py", line 5, in <module>\r
[Thu Feb 18 09:03:58.636970 2021] [wsgi:error] [pid 5724:tid 1120] [client 110.225.67.165:26675] from azure.storage.blob import BlobServiceClient\r
[Thu Feb 18 09:03:58.636970 2021] [wsgi:error] [pid 5724:tid 1120] [client 110.225.67.165:26675] ModuleNotFoundError: No module named 'azure.storage'\r
请帮我解决问题。这对我很有帮助。
解决方案
你确定azure.storage
机器上安装了?
script: pip install azure-storage
尝试pip list
查看您的机器上安装了哪些模块。
另外,请注意,您的代码使用的版本已安装在您的机器上。
推荐阅读
- python - 使用 python 抓取网站时 CSV 列中的输出元素
- javascript - 我该如何解决这个问题?我正在尝试在构造函数中获取方法,该方法将对两个数字执行代数
- c# - 与 Aspnet_regiis.exe –ir –enable 等效的 .NET Core 命令是什么
- html - 从手机查看时样式移动
- c# - C#从执行的泛型方法中获取泛型类型参数而不直接引用它们,即typeof(T0)
- postgresql - 将 Row_Number() 与 Update 语句一起使用
- java - java线程顺序
- javascript - 地图与对象时间复杂度(Node.js)
- ios - 如何从位置管理器只复制一次用户位置?
- r - 将概率模型拟合到 3 个标准正态协变量的 200 个观测值