inference BUG: ImportError: 无法从 'typing_extensions' 导入 'Union' (/usr/local/lib/python3.10/dist-packages/typing_extensions.py)

yhived7q  于 5个月前  发布在  Python
关注(0)|答案(1)|浏览(51)

Describe the bug

Traceback (most recent call last): File "/usr/local/bin/xinference", line 5, in <module> from xinference.deploy.cmdline import cli File "/usr/local/lib/python3.10/dist-packages/xinference/__init__.py", line 38, in <module> _install() File "/usr/local/lib/python3.10/dist-packages/xinference/__init__.py", line 35, in _install install_model() File "/usr/local/lib/python3.10/dist-packages/xinference/model/__init__.py", line 17, in _install from .llm import _install as llm_install File "/usr/local/lib/python3.10/dist-packages/xinference/model/llm/__init__.py", line 19, in <module> from .core import ( File "/usr/local/lib/python3.10/dist-packages/xinference/model/llm/core.py", line 23, in <module> from ...core.utils import parse_replica_model_uid File "/usr/local/lib/python3.10/dist-packages/xinference/core/__init__.py", line 15, in <module> from .model import ModelActor File "/usr/local/lib/python3.10/dist-packages/xinference/core/model.py", line 47, in <module> from ..device_utils import empty_cache File "/usr/local/lib/python3.10/dist-packages/xinference/device_utils.py", line 18, in <module> from typing_extensions import Literal, Union ImportError: cannot import name 'Union' from 'typing_extensions' (/usr/local/lib/python3.10/dist-packages/typing_extensions.py)
在按照jupyter notebook教程中的步骤运行时报错

vkc1a9a2

vkc1a9a21#

你可以试试这个句 import 会报错吗? from typing import Literal, Union

相关问题