flask uwsgi nginx centos error import module numpy

2024-10-08 18:28:02 发布

您现在位置:Python中文网/ 问答频道 /正文

virtualenv中的Python3.6和numpy

启动服务时:

r-python uwsgi[9729]: def empty_like(prototype, dtype=None, order=None, subok=None):
r-python uwsgi[9729]: File "/home/user01/python/conserva/conservaenv/lib64/python3.6/site-packages/numpy/core/overrides.py", line 240, in decorator
r-python uwsgi[9729]: docs_from_dispatcher=docs_from_dispatcher)(implementation)
r-python uwsgi[9729]: File "/home/user01/python/conserva/conservaenv/lib64/python3.6/site-packages/numpy/core/overrides.py", line 204, in decorator
r-python uwsgi[9729]: add_docstring(implementation, dispatcher.__doc__)
r-python uwsgi[9729]: RuntimeError: empty_like method already has a docstring
r-python uwsgi[9729]: VACUUM: unix socket conserva.sock removed.
r-python systemd[1]: conserva.service: main process exited, code=exited, status=22/n/a
r-python systemd[1]: Unit conserva.service entered failed state.
r-python systemd[1]: conserva.service failed.

如果我从应用程序代码中删除“import numpy”,服务就会运行。问题是什么?我怎样才能修好它?在


Tags: numpynonehomeservicesiteuwsgilikefile
1条回答
网友
1楼 · 发布于 2024-10-08 18:28:02

我在uWSGI下运行导入numpy的项目时遇到过这种情况。在uWSGIs使用的默认子解释器和numpy的初始化之间有一些交互。在

你可以告诉uWSGI不要在你的uWSGI配置中使用子解释器:

single-interpreter = true

添加到哪里取决于您如何配置uWSGI。在

相关问题 更多 >

    热门问题