英文:
Singularity and numba/numpy: RuntimeError: Attempted to compile AOT function without the compiler used by `numpy.distutils` present
问题
我的软件是用Python编写的,使用了numba和numpy。我使用Docker进行分发。
这是Dockerfile。
我的一个用户(参见GitHub问题)希望在使用Singularity而不是Docker的HPC上运行该软件。他遇到了以下错误消息:
$ singularity pull docker://troder/scoary-2
$ singularity run scoary-2_latest.sif scoary2 --help
Traceback (most recent call last):
File "/usr/local/bin/scoary2", line 5, in <module>
from scoary.scoary import main
File "/usr/local/lib/python3.10/site-packages/scoary/__init__.py", line 1, in <module>
from .scoary import scoary
File "/usr/local/lib/python3.10/site-packages/scoary/scoary.py", line 7, in <module>
from .analyze_trait import analyze_trait, worker
File "/usr/local/lib/python3.10/site-packages/scoary/analyze_trait.py", line 7, in <module>
from fast_fisher.fast_fisher_numba import odds_ratio, test1t as fisher_exact_two_tailed
File "/usr/local/lib/python3.10/site-packages/fast_fisher/fast_fisher_numba.py", line 5, in <module>
cc = CC('fast_fisher_compiled')
File "/usr/local/lib/python3.10/site-packages/numba/pycc/cc.py", line 65, in __init__
self._toolchain = Toolchain()
File "/usr/local/lib/python3.10/site-packages/numba/pycc/platform.py", line 78, in __init__
self._raise_external_compiler_error()
File "/usr/local/lib/python3.10/site-packages/numba/pycc/platform.py", line 121, in _raise_external_compiler_error
raise RuntimeError(msg)
RuntimeError: Attempted to compile AOT function without the compiler used by `numpy.distutils` present. If using conda try:
#> conda install gcc_linux-64 gxx_linux-64
在我的HPC的Singularity上,它可以正常工作。有什么不同?如何调试或解决这个问题?
英文:
My software is written in Python and uses numba and numpy. I distribute it using Docker.
Here is the Dockerfile.
One of my users (see GitHub issue) wants to run the software on a HPC where Singularity is used instead of Docker. He gets the following error message:
$ singularity pull docker://troder/scoary-2
$ singularity run scoary-2_latest.sif scoary2 --help
Traceback (most recent call last):
File "/usr/local/bin/scoary2", line 5, in <module>
from scoary.scoary import main
File "/usr/local/lib/python3.10/site-packages/scoary/__init__.py", line 1, in <module>
from .scoary import scoary
File "/usr/local/lib/python3.10/site-packages/scoary/scoary.py", line 7, in <module>
from .analyze_trait import analyze_trait, worker
File "/usr/local/lib/python3.10/site-packages/scoary/analyze_trait.py", line 7, in <module>
from fast_fisher.fast_fisher_numba import odds_ratio, test1t as fisher_exact_two_tailed
File "/usr/local/lib/python3.10/site-packages/fast_fisher/fast_fisher_numba.py", line 5, in <module>
cc = CC('fast_fisher_compiled')
File "/usr/local/lib/python3.10/site-packages/numba/pycc/cc.py", line 65, in __init__
self._toolchain = Toolchain()
File "/usr/local/lib/python3.10/site-packages/numba/pycc/platform.py", line 78, in __init__
self._raise_external_compiler_error()
File "/usr/local/lib/python3.10/site-packages/numba/pycc/platform.py", line 121, in _raise_external_compiler_error
raise RuntimeError(msg)
RuntimeError: Attempted to compile AOT function without the compiler used by `numpy.distutils` present. If using conda try:
#> conda install gcc_linux-64 gxx_linux-64
On my HPC's Singularity, it works without issue. What is different? How to debug or solve this?
答案1
得分: 0
安装gcc
和python-devel
是不够的,还需要安装gcc-c++
!(Fedora)
英文:
It was not enough to install gcc
and python-devel
, it also required gcc-c++
! (Fedora)
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论