#5523·inference

cutery errors

Author: shaofengzengCreated Sep 11, 2026Updated Sep 11, 2026

System Info / 系統信息

ubuntu 24.04 conda envs with python==3.10.20 pip install "xinference[all]" errors: error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> [85 lines of output]

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
      def __init__(self, vocab: Dict[str, int], merges: List[Tuple[str, str]]):
          self._byte_encoder = bytes_to_unicode()
          self._byte_decoder = {v.decode("utf-8"): k for k, v in self._byte_encoder.items()}
          self._split_pattern = regex.compile(SPLIT_PATTERN)
          self._piece_to_id = vocab
          self._id_to_piece = {v: k for k, v in vocab.items()}
                                                           ^
  ------------------------------------------------------------
  cutlery/_bbpe.pyx:63:57: Compiler crash in OptimizeBuiltinCalls
  
  ModuleNode.body = StatListNode(_bbpe.pyx:3:0)
  StatListNode.stats[9] = StatListNode(_bbpe.pyx:50:0)
  StatListNode.stats[0] = CClassDefNode(_bbpe.pyx:50:0,
      as_name = 'ByteBPEProcessor',
      class_name = 'ByteBPEProcessor',
      module_name = '',
      punycode_class_name = 'ByteBPEProcessor',
      visibility = 'private')
  CClassDefNode.body = StatListNode(_bbpe.pyx:51:4)
  StatListNode.stats[0] = DefNode(_bbpe.pyx:58:4,
      modifiers = [...]/0,
      name = '__init__',
      node_positions = [...]/65,
      np_args_idx = [...]/0,
      num_required_args = 3,
      outer_attrs = [...]/2,
      py_wrapper_required = True,
      reqd_kw_flags_cname = '0',
      used = True)
  DefNode.body = StatListNode(_bbpe.pyx:59:8)
  StatListNode.stats[4] = SingleAssignmentNode(_bbpe.pyx:63:28)
  SingleAssignmentNode.rhs = ComprehensionNode(_bbpe.pyx:63:28,
      has_local_scope = True,
      is_temp = True,
      result_is_used = True,
      use_managed_ref = True)
  ComprehensionNode.loop = ForInStatNode(_bbpe.pyx:63:34)
  ForInStatNode.iterator = IteratorNode(_bbpe.pyx:63:46,
      is_temp = 1,
      result_is_used = True,
      use_managed_ref = True)
  IteratorNode.sequence = SimpleCallNode(_bbpe.pyx:63:57,
      analysed = True,
      is_temp = 1,
      result_is_used = True,
      use_managed_ref = True)
  
  Compiler crash traceback from this point on:
    File "Cython/Compiler/Visitor.py", line 174, in Cython.Compiler.Visitor.TreeVisitor._visit
    File "Cython/Compiler/Visitor.py", line 578, in Cython.Compiler.Visitor.MethodDispatcherTransform.visit_SimpleCallNode
    File "Cython/Compiler/Visitor.py", line 699, in Cython.Compiler.Visitor.MethodDispatcherTransform._dispatch_to_handler
  TypeError: 'NoneType' object is unsliceable
  Cythonizing sources
  Compiling cutlery/_spp.pyx because it changed.
  Compiling cutlery/_wordpiece.pyx because it changed.
  Compiling cutlery/_bbpe.pyx because it changed.
  [1/3] Cythonizing cutlery/_bbpe.pyx
  Traceback (most recent call last):
    File "/home/zsf/anaconda3/envs/xinfer/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in <module>
      main()
    File "/home/zsf/anaconda3/envs/xinfer/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 373, in main
      json_out["return_val"] = hook(**hook_input["kwargs"])
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/zsf/anaconda3/envs/xinfer/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 143, in get_requires_for_build_wheel
      return hook(config_settings)
             ^^^^^^^^^^^^^^^^^^^^^
    File "/tmp/pip-build-env-3lcz9hys/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 333, in get_requires_for_build_wheel
      return self._get_build_requires(config_settings, requirements=[])
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/tmp/pip-build-env-3lcz9hys/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 301, in _get_build_requires
      self.run_setup()
    File "/tmp/pip-build-env-3lcz9hys/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 317, in run_setup
      exec(code, locals())  # noqa: S102 # exec is intentional here
      ^^^^^^^^^^^^^^^^^^^^
    File "<string>", line 210, in <module>
    File "<string>", line 197, in setup_package
    File "/tmp/pip-build-env-3lcz9hys/overlay/lib/python3.12/site-packages/Cython/Build/Dependencies.py", line 1153, in cythonize
      cythonize_one(*args)
    File "/tmp/pip-build-env-3lcz9hys/overlay/lib/python3.12/site-packages/Cython/Build/Dependencies.py", line 1264, in cythonize_one
      raise CompileError(None, pyx_file)
  Cython.Compiler.Errors.CompileError: cutlery/_bbpe.pyx
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed to build 'cutlery' when getting requirements to build wheel

Running Xinference with Docker? / 是否使用 Docker 运行 Xinfernece?

  • docker / docker
  • pip install / 通过 pip install 安装
  • installation from source / 从源码安装

Version info / 版本信息

latest

The command used to start Xinference / 用以启动 xinference 的命令

还未启动,安装出错

Reproduction / 复现过程

conda create -n xinfer python==3.10.20 pip install "xinference[all]"

Expected behavior / 期待表现

fix