Python 在RHEL8上使用mod_wsgi和virtualenv时,SELinux导致numpy的导入失败,有什么可以做的吗?

Python 在RHEL8上使用mod_wsgi和virtualenv时,SELinux导致numpy的导入失败,有什么可以做的吗?,python,apache,mod-wsgi,selinux,Python,Apache,Mod Wsgi,Selinux,SELinux给我带来的只是麻烦,但我正试图让服务器上的所有东西都能使用它。如果我打开了它,我的一个使用numpy的函数将失败,我将在日志中看到: [Fri Nov 13 22:16:13.448966 2020] [wsgi:error] [pid 11121:tid 140573445281536] [remote 24.44.183.72:55501] IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE! [F

SELinux给我带来的只是麻烦,但我正试图让服务器上的所有东西都能使用它。如果我打开了它,我的一个使用numpy的函数将失败,我将在日志中看到:

[Fri Nov 13 22:16:13.448966 2020] [wsgi:error] [pid 11121:tid 140573445281536] [remote 24.44.183.72:55501] IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
[Fri Nov 13 22:16:13.448969 2020] [wsgi:error] [pid 11121:tid 140573445281536] [remote 24.44.183.72:55501]
[Fri Nov 13 22:16:13.448972 2020] [wsgi:error] [pid 11121:tid 140573445281536] [remote 24.44.183.72:55501] Importing the numpy C-extensions failed. This error can happen for
[Fri Nov 13 22:16:13.448975 2020] [wsgi:error] [pid 11121:tid 140573445281536] [remote 24.44.183.72:55501] many reasons, often due to issues with your setup or how NumPy was
[Fri Nov 13 22:16:13.448979 2020] [wsgi:error] [pid 11121:tid 140573445281536] [remote 24.44.183.72:55501] installed.
[Fri Nov 13 22:16:13.448982 2020] [wsgi:error] [pid 11121:tid 140573445281536] [remote 24.44.183.72:55501]
[Fri Nov 13 22:16:13.448985 2020] [wsgi:error] [pid 11121:tid 140573445281536] [remote 24.44.183.72:55501] We have compiled some common reasons and troubleshooting tips at:
[Fri Nov 13 22:16:13.448988 2020] [wsgi:error] [pid 11121:tid 140573445281536] [remote 24.44.183.72:55501]
[Fri Nov 13 22:16:13.448991 2020] [wsgi:error] [pid 11121:tid 140573445281536] [remote 24.44.183.72:55501]     https://numpy.org/devdocs/user/troubleshooting-importerror.html
[Fri Nov 13 22:16:13.448995 2020] [wsgi:error] [pid 11121:tid 140573445281536] [remote 24.44.183.72:55501]
[Fri Nov 13 22:16:13.448998 2020] [wsgi:error] [pid 11121:tid 140573445281536] [remote 24.44.183.72:55501] Please note and check the following:
[Fri Nov 13 22:16:13.449001 2020] [wsgi:error] [pid 11121:tid 140573445281536] [remote 24.44.183.72:55501]
[Fri Nov 13 22:16:13.449004 2020] [wsgi:error] [pid 11121:tid 140573445281536] [remote 24.44.183.72:55501]   * The Python version is: Python3.6 from "/var/www/finnmaps/fmvenv2/bin/python"
[Fri Nov 13 22:16:13.449008 2020] [wsgi:error] [pid 11121:tid 140573445281536] [remote 24.44.183.72:55501]   * The NumPy version is: "1.19.4"
[Fri Nov 13 22:16:13.449011 2020] [wsgi:error] [pid 11121:tid 140573445281536] [remote 24.44.183.72:55501]
[Fri Nov 13 22:16:13.449014 2020] [wsgi:error] [pid 11121:tid 140573445281536] [remote 24.44.183.72:55501] and make sure that they are the versions you expect.
[Fri Nov 13 22:16:13.449018 2020] [wsgi:error] [pid 11121:tid 140573445281536] [remote 24.44.183.72:55501] Please carefully study the documentation linked above for further help.
如果我使用
setEnforce0
关闭SELinux,它将按预期运行。此虚拟环境所在的目录已被授予读/写访问权限,SELinux中是否还有其他可以配置为允许导入numpy的内容

谢谢