Bug description
$ python test2.py
Failed to import ahead-of-time-compiled modules. This is expected on first import.
Compiling modules and trying again (this might take a minute).
Traceback (most recent call last):
File "/home/sav/pytest/envrembg/lib64/python3.8/site-packages/pymatting_aot/cc.py", line 21, in
import pymatting_aot.aot
ModuleNotFoundError: No module named 'pymatting_aot.aot'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "test2.py", line 1, in
from pymatting import cutout
File "/home/sav/pytest/envrembg/lib64/python3.8/site-packages/pymatting/init.py", line 2, in
import pymatting_aot.cc
File "/home/sav/pytest/envrembg/lib64/python3.8/site-packages/pymatting_aot/cc.py", line 28, in
compile_modules()
File "/home/sav/pytest/envrembg/lib64/python3.8/site-packages/pymatting_aot/cc.py", line 6, in compile_modules
cc = CC("aot")
File "/home/sav/pytest/envrembg/lib64/python3.8/site-packages/numba/pycc/cc.py", line 65, in init
self._toolchain = Toolchain()
File "/home/sav/pytest/envrembg/lib64/python3.8/site-packages/numba/pycc/platform.py", line 78, in init
self._raise_external_compiler_error()
File "/home/sav/pytest/envrembg/lib64/python3.8/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
To Reproduce
installed pymatting with pip install rembg on Fedora 33 within venv for Python3.8
create test2.py:
from pymatting import cutout
cutout(
# input image path
"data/lemur/lemur.png",
# input trimap path
"data/lemur/lemur_trimap.png",
# output cutout path
"lemur_cutout.png")
launch:
python test2.py within venv for Python3.8
Expected behavior
runed without errors
Images
(Add relevant images.)
Library versions:
(Run the following commands and paste the result here.)
python --version --version
Python 3.8.6 (default, Sep 25 2020, 00:00:00)
[GCC 10.2.1 20200826 (Red Hat 10.2.1-3)]
(envrembg) [sav@localhost envrembg]$ python -c "import numpy; numpy.show_config()"
python -c "import numpy; numpy.show_config()"
blas_mkl_info:
NOT AVAILABLE
blis_info:
NOT AVAILABLE
openblas_info:
libraries = ['openblas', 'openblas']
library_dirs = ['/usr/local/lib']
language = c
define_macros = [('HAVE_CBLAS', None)]
blas_opt_info:
libraries = ['openblas', 'openblas']
library_dirs = ['/usr/local/lib']
language = c
define_macros = [('HAVE_CBLAS', None)]
lapack_mkl_info:
NOT AVAILABLE
openblas_lapack_info:
libraries = ['openblas', 'openblas']
library_dirs = ['/usr/local/lib']
language = c
define_macros = [('HAVE_CBLAS', None)]
lapack_opt_info:
libraries = ['openblas', 'openblas']
library_dirs = ['/usr/local/lib']
language = c
define_macros = [('HAVE_CBLAS', None)]
python -c "import scipy;scipy.show_config()"
lapack_mkl_info:
NOT AVAILABLE
openblas_lapack_info:
libraries = ['openblas', 'openblas']
library_dirs = ['/usr/local/lib']
language = c
define_macros = [('HAVE_CBLAS', None)]
lapack_opt_info:
libraries = ['openblas', 'openblas']
library_dirs = ['/usr/local/lib']
language = c
define_macros = [('HAVE_CBLAS', None)]
blas_mkl_info:
NOT AVAILABLE
blis_info:
NOT AVAILABLE
openblas_info:
libraries = ['openblas', 'openblas']
library_dirs = ['/usr/local/lib']
language = c
define_macros = [('HAVE_CBLAS', None)]
blas_opt_info:
libraries = ['openblas', 'openblas']
library_dirs = ['/usr/local/lib']
language = c
define_macros = [('HAVE_CBLAS', None)]
python -c "import numba;print('Numba version:', numba.__version__)"
Numba version: 0.51.2
python -c "import PIL;print('PIL version:', PIL.__version__)"
PIL version: 8.0.1
python -c "from pymatting.__about__ import __version__;print('PyMatting version:', __version__)"
Failed to import ahead-of-time-compiled modules. This is expected on first import.
Compiling modules and trying again (this might take a minute).
Traceback (most recent call last):
File "/home/sav/pytest/envrembg/lib64/python3.8/site-packages/pymatting_aot/cc.py", line 21, in <module>
import pymatting_aot.aot
ModuleNotFoundError: No module named 'pymatting_aot.aot'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/sav/pytest/envrembg/lib64/python3.8/site-packages/pymatting/__init__.py", line 2, in <module>
import pymatting_aot.cc
File "/home/sav/pytest/envrembg/lib64/python3.8/site-packages/pymatting_aot/cc.py", line 28, in <module>
compile_modules()
File "/home/sav/pytest/envrembg/lib64/python3.8/site-packages/pymatting_aot/cc.py", line 6, in compile_modules
cc = CC("aot")
File "/home/sav/pytest/envrembg/lib64/python3.8/site-packages/numba/pycc/cc.py", line 65, in __init__
self._toolchain = Toolchain()
File "/home/sav/pytest/envrembg/lib64/python3.8/site-packages/numba/pycc/platform.py", line 78, in __init__
self._raise_external_compiler_error()
File "/home/sav/pytest/envrembg/lib64/python3.8/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