安装transformers, cannot import name ‘CommitOperationAdd‘ from ‘huggingface_hub‘ (unknown location)
雨_刃 2024-06-14 13:31:01 阅读 94
cannot import name 'CommitOperationAdd' from 'huggingface_hub' (unknown location)
错误提示:
(torchcpupy38) D:\Auser>pythonPython 3.8.13 (default, Mar 28 2022, 06:59:08) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32Type "help", "copyright", "credits" or "license" for more information.>>> import transformers2023-01-07 21:01:44.682637: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found2023-01-07 21:01:44.688424: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.Traceback (most recent call last): File "<stdin>", line 1, in <module> File "D:\AworkStation\Anaconda3\envs\torchcpupy38\lib\site-packages\transformers\__init__.py", line 30, in <module> from . import dependency_versions_check File "D:\AworkStation\Anaconda3\envs\torchcpupy38\lib\site-packages\transformers\dependency_versions_check.py", line 17, in <module> from .utils.versions import require_version, require_version_core File "D:\AworkStation\Anaconda3\envs\torchcpupy38\lib\site-packages\transformers\utils\__init__.py", line 59, in <module> from .hub import ( File "D:\AworkStation\Anaconda3\envs\torchcpupy38\lib\site-packages\transformers\utils\hub.py", line 32, in <module> from huggingface_hub import (ImportError: cannot import name 'CommitOperationAdd' from 'huggingface_hub' (unknown location)
解决方式:
(torchcpupy38) D:\Auser>conda install -c dglteam dgl
(torchcpupy38) D:\Auser>pip install transformers[torch]
(torchcpupy38) D:\Auser>conda install huggingface_hub
上一篇: 使用YOLOv5实现图片、视频的目标检测
下一篇: AI大模型应用开发实践:3.使用 tiktoken 计算 token 数量
本文标签
cannot import name ‘CommitOperationAdd‘ from ‘huggingface_hub‘ (unknown location) 安装transformers
声明
本文内容仅代表作者观点,或转载于其他网站,本站不以此文作为商业用途
如有涉及侵权,请联系本站进行删除
转载本站原创文章,请注明来源及作者。