python调用包时报错,已经pip了modelscope包,不知道为啥
from modelscope.pipelines import pipeline
报错如下,求大神解答
下面是报错代码
--------------------------------------------------------------------------- ImportError Traceback (most recent call last) Cell In[4], line 1 ----> 1 from modelscope.pipelines import pipeline File ~\AppData\Roaming\Python\Python311\site-packages\modelscope\pipelines\__init__.py:4 1 # Copyright (c) Alibaba, Inc. and its affiliates. 3 from . import audio, cv, multi_modal, nlp ----> 4 from .base import Pipeline 5 from .builder import pipeline File ~\AppData\Roaming\Python\Python311\site-packages\modelscope\pipelines\base.py:16 13 from packaging import version 15 from modelscope.models.base import Model ---> 16 from modelscope.msdatasets import MsDataset 17 from modelscope.outputs import TASK_OUTPUTS, ModelOutputBase 18 from modelscope.pipeline_inputs import TASK_INPUTS, check_input_type File ~\AppData\Roaming\Python\Python311\site-packages\modelscope\msdatasets\__init__.py:2 1 # Copyright (c) Alibaba, Inc. and its affiliates. ----> 2 from modelscope.msdatasets.ms_dataset import MsDataset File ~\AppData\Roaming\Python\Python311\site-packages\modelscope\msdatasets\ms_dataset.py:24 21 from modelscope.msdatasets.dataset_cls.custom_datasets.builder import \ 22 build_custom_dataset 23 from modelscope.msdatasets.utils.delete_utils import DatasetDeleteManager ---> 24 from modelscope.msdatasets.utils.hf_datasets_util import load_dataset_with_ctx 25 from modelscope.msdatasets.utils.upload_utils import DatasetUploadManager 26 from modelscope.preprocessors import build_preprocessor File ~\AppData\Roaming\Python\Python311\site-packages\modelscope\msdatasets\utils\hf_datasets_util.py:63 61 from modelscope import HubApi 62 from modelscope.hub.utils.utils import get_endpoint ---> 63 from modelscope.msdatasets.utils.hf_file_utils import get_from_cache_ms 64 from modelscope.utils.config_ds import MS_DATASETS_CACHE 65 from modelscope.utils.constant import DEFAULT_DATASET_NAMESPACE File ~\AppData\Roaming\Python\Python311\site-packages\modelscope\msdatasets\utils\hf_file_utils.py:18 15 import requests 17 from datasets import config ---> 18 from datasets.utils.file_utils import hash_url_to_filename, get_authentication_headers_for_url, ftp_head, fsspec_head, \ 19 http_head, _raise_if_offline_mode_is_enabled, ftp_get, fsspec_get, http_get 20 from filelock import FileLock 22 from modelscope.utils.config_ds import MS_DATASETS_CACHE ImportError: cannot import name 'ftp_head' from 'datasets.utils.file_utils' (C:\Users\27239\AppData\Roaming\Python\Python311\site-packages\datasets\utils\file_utils.py)