【问题标题】:Python - I'm not able run RemBG programPython - 我无法运行 RemBG 程序
【发布时间】:2023-02-04 15:26:45
【问题描述】:

我正在尝试在我的系统中设置 rembg github repository,但我遇到了问题 运行语句 rembg i input.png output.png 时,我遇到以下错误

PS C:\Users\Asad Kareem\Desktop\Happy Frog> rembg i input.png output.png                
Traceback (most recent call last):
  File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\Asad Kareem\AppData\Local\Programs\Python\Python39-32\Scripts\rembg.exe\__main__.py", line 4, in <module>
  File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\site-packages\rembg\__init__.py", line 11, in <module>
    from .bg import remove
  File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\site-packages\rembg\bg.py", line 8, in <module>
    from pymatting.alpha.estimate_alpha_cf import estimate_alpha_cf
  File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\site-packages\pymatting\__init__.py", line 2, in <module>
    from pymatting.util import *
  File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\site-packages\pymatting\util\__init__.py", line 2, in <module>
    from pymatting.util.kdtree import KDTree, knn
  File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\site-packages\pymatting\util\kdtree.py", line 138, in <module>
    def _find_knn(
  File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\site-packages\numba\core\decorators.py", line 219, in wrapper
    disp.compile(sig)
  File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\site-packages\numba\core\dispatcher.py", line 965, in compile
    cres = self._compiler.compile(args, return_type)
  File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\site-packages\numba\core\dispatcher.py", line 125, in compile
    status, retval = self._compile_cached(args, return_type)
  File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\site-packages\numba\core\dispatcher.py", line 139, in _compile_cached
    retval = self._compile_core(args, return_type)
  File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\site-packages\numba\core\dispatcher.py", line 152, in _compile_core
    cres = compiler.compile_extra(self.targetdescr.typing_context,
  File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\site-packages\numba\core\compiler.py", line 693, in compile_extra
    return pipeline.compile_extra(func)
  File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\site-packages\numba\core\compiler.py", line 429, in compile_extra
    return self._compile_bytecode()
  File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\site-packages\numba\core\compiler.py", line 497, in _compile_bytecode
    return self._compile_core()
  File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\site-packages\numba\core\compiler.py", line 476, in _compile_core
    raise e
  File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\site-packages\numba\core\compiler.py", line 463, in _compile_core
    pm.run(self.state)
  File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\site-packages\numba\core\compiler_machinery.py", line 353, in run
    raise patched_exception
  File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\site-packages\numba\core\compiler_machinery.py", line 341, in run
    self._runPass(idx, pass_inst, state)
  File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\site-packages\numba\core\compiler_lock.py", line 35, in _acquire_compile_lock
    return func(*args, **kwargs)
  File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\site-packages\numba\core\compiler_machinery.py", line 296, in _runPass
    mutated |= check(pss.run_pass, internal_state)
  File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\site-packages\numba\core\compiler_machinery.py", line 269, in check
    mangled = func(compiler_state)
  File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\site-packages\numba\core\typed_passes.py", line 394, in run_pass
    lower.lower()
  File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\site-packages\numba\core\lowering.py", line 196, in lower
    self.lower_normal_function(self.fndesc)
  File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\site-packages\numba\core\lowering.py", line 250, in lower_normal_function
    entry_block_tail = self.lower_function_body()
  File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\site-packages\numba\core\lowering.py", line 279, in lower_function_body
    self.lower_block(block)
  File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\site-packages\numba\core\lowering.py", line 293, in lower_block
    self.lower_inst(inst)
  File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\site-packages\numba\core\lowering.py", line 565, in lower_inst
    func(self, inst)
  File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\site-packages\numba\parfors\parfor_lowering.py", line 64, in _lower_parfor_parallel
    ensure_parallel_support()
  File "c:\users\asad kareem\appdata\local\programs\python\python39-32\lib\site-packages\numba\parfors\parfor.py", line 4701, in ensure_parallel_support
    raise errors.UnsupportedParforsError(msg)
numba.core.errors.UnsupportedParforsError: Failed in nopython mode pipeline (step: native lowering)

有人可以帮我解决这个问题吗?

【问题讨论】:

    标签: python-imaging-library python-3.9


    【解决方案1】:

    我有同样的错误,我已经尝试了所有选项。一切都已安装,所有软件包。但是无法运行

    【讨论】:

    猜你喜欢
    • 2021-12-19
    • 2022-09-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-04-26
    • 1970-01-01
    相关资源
    最近更新 更多