gpt4 book ai didi

python - 通过azure应用程序服务部署导入gluoncv时未找到OSError : libgomp. so.1

转载 作者:行者123 更新时间:2023-12-03 02:18:18 24 4
gpt4 key购买 nike

我有一个 Web 应用程序,我正在尝试将其部署到 azure。解决了各种问题后,我陷入了下面粘贴的困境。

我正在使用 python 3.7,并且我有 Windows 10。尝试部署具有多个计算机视觉模型的 Flask 应用程序。我通过 azure cli 创建了一个虚拟环境,安装了我的 requiremnts.txt,然后部署它。它确实部署成功,但当我查看网站时,它显示“应用程序错误。以下是我检查日志时看到的内容。到目前为止,我已经尝试了一些我在这里找到的内容,但仍然无法找到解决方案:

https://github.com/business-science/modeltime.gluonts/issues/32

torch 可以解决这个问题吗?只是想知道。

2021-12-01T10:47:07.975121283Z Traceback (most recent call last):
2021-12-01T10:47:07.975390586Z File "/opt/python/3.7.9/lib/python3.7/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker
2021-12-01T10:47:07.975445787Z worker.init_process()
2021-12-01T10:47:07.975466487Z File "/opt/python/3.7.9/lib/python3.7/site-packages/gunicorn/workers/base.py", line 134, in init_process
2021-12-01T10:47:07.975473287Z self.load_wsgi()
2021-12-01T10:47:07.975478588Z File "/opt/python/3.7.9/lib/python3.7/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
2021-12-01T10:47:07.975484588Z self.wsgi = self.app.wsgi()
2021-12-01T10:47:07.975489588Z File "/opt/python/3.7.9/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
2021-12-01T10:47:07.975495488Z self.callable = self.load()
2021-12-01T10:47:07.975665490Z File "/opt/python/3.7.9/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
2021-12-01T10:47:07.975673090Z return self.load_wsgiapp()
2021-12-01T10:47:07.975678990Z File "/opt/python/3.7.9/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
2021-12-01T10:47:07.975686090Z return util.import_app(self.app_uri)
2021-12-01T10:47:07.975691690Z File "/opt/python/3.7.9/lib/python3.7/site-packages/gunicorn/util.py", line 359, in import_app
2021-12-01T10:47:07.975698190Z mod = importlib.import_module(module)
2021-12-01T10:47:07.975704290Z File "/opt/python/3.7.9/lib/python3.7/importlib/__init__.py", line 127, in import_module
2021-12-01T10:47:07.975778791Z return _bootstrap._gcd_import(name[level:], package, level)
2021-12-01T10:47:07.975785391Z File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
2021-12-01T10:47:07.975792491Z File "<frozen importlib._bootstrap>", line 983, in _find_and_load
2021-12-01T10:47:07.975798791Z File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
2021-12-01T10:47:07.975804591Z File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
2021-12-01T10:47:07.975810291Z File "<frozen importlib._bootstrap_external>", line 728, in exec_module
2021-12-01T10:47:07.975816592Z File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
2021-12-01T10:47:07.975822592Z File "/tmp/8d9b4b3d8465f24/app.py", line 6, in <module>
2021-12-01T10:47:07.975828692Z import cv_ins
2021-12-01T10:47:07.975834792Z File "/tmp/8d9b4b3d8465f24/cv_ins.py", line 9, in <module>
2021-12-01T10:47:07.975840792Z import gluoncv
2021-12-01T10:47:07.975846292Z File "/tmp/8d9b4b3d8465f24/antenv/lib/python3.7/site-packages/gluoncv/__init__.py", line 16, in <module>
2021-12-01T10:47:07.975852292Z _require_mxnet_version('1.4.0', '2.0.0')
2021-12-01T10:47:07.975858292Z File "/tmp/8d9b4b3d8465f24/antenv/lib/python3.7/site-packages/gluoncv/check.py", line 6, in _require_mxnet_version
2021-12-01T10:47:07.975867092Z import mxnet as mx
2021-12-01T10:47:07.975882692Z File "/tmp/8d9b4b3d8465f24/antenv/lib/python3.7/site-packages/mxnet/__init__.py", line 23, in <module>
2021-12-01T10:47:07.975888892Z from .context import Context, current_context, cpu, gpu, cpu_pinned
2021-12-01T10:47:07.975894292Z File "/tmp/8d9b4b3d8465f24/antenv/lib/python3.7/site-packages/mxnet/context.py", line 23, in <module>
2021-12-01T10:47:07.975901293Z from .base import classproperty, with_metaclass, _MXClassPropertyMetaClass
2021-12-01T10:47:07.975907193Z File "/tmp/8d9b4b3d8465f24/antenv/lib/python3.7/site-packages/mxnet/base.py", line 351, in <module>
2021-12-01T10:47:07.975912693Z _LIB = _load_lib()
2021-12-01T10:47:07.975917793Z File "/tmp/8d9b4b3d8465f24/antenv/lib/python3.7/site-packages/mxnet/base.py", line 342, in _load_lib
2021-12-01T10:47:07.975923593Z lib = ctypes.CDLL(lib_path[0], ctypes.RTLD_LOCAL)
2021-12-01T10:47:07.975929293Z File "/opt/python/3.7.9/lib/python3.7/ctypes/__init__.py", line 364, in __init__
2021-12-01T10:47:07.975935793Z self._handle = _dlopen(self._name, mode)
2021-12-01T10:47:07.975941293Z OSError: libgomp.so.1: cannot open shared object file: No such file or directory

我的要求.txt:

Flask==2.0.1
gluoncv==0.10.4.post1
imutils==0.5.4
ipywidgets==7.6.3
matplotlib==3.4.2
mxnet==1.7.0.post2
numpy
numpydoc
opencv-python==4.5.3.56
pandas==1.3.1
py==1.11.0
schedule==1.1.0
Werkzeug==2.0.1
zipp

最佳答案

您可以修复此OSError:libgomp.so.1:无法打开共享对象文件:没有这样的文件或目录 OSError通过安装libgomp1

对于 Windows:

此错误可能是由于缺少 OpenCV/gluoncv 的依赖项而导致的

您可以引用微软问答上的类似问题:OSError: libgomp.so.1: cannot open shared object file: No such file or directory

对于 Linux:

sudo apt-get install libgomp1

您可以引用libgomp.so.1: cannot open shared object file: No such file or directory

关于python - 通过azure应用程序服务部署导入gluoncv时未找到OSError : libgomp. so.1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70183074/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com