赞
踩
我的电脑之前应该是在官网下载python安装的,用transformers没有什么问题,然后重装系统后,我是直接在微软商店安装了python,结果就死活装不上transformers了,一直报什么ERROR: build wheel for tokenizers...类似下面这样:
- Building wheels for collected packages: tokenizers
- error: subprocess-exited-with-error
-
- × Building wheel for tokenizers (pyproject.toml) did not run successfully.
- │ exit code: 1
- ╰─> See above for output.
-
- note: This error originates from a subprocess, and is likely not a problem with pip.
- Building wheel for tokenizers (pyproject.toml) ... error
- ERROR: Failed building wheel for tokenizers
- Failed to build tokenizers
- ERROR: Could not build wheels for tokenizers, which is required to install pyproject.toml-based projects
试了网上说的几种方法,都不行:
直到出现了下面这个错误:
- ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: 'C:\\Users\\ysr21\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python312\\site-packages\\transformers\\models\\deprecated\\trajectory_transformer\\convert_trajectory_transformer_original_pytorch_checkpoint_to_pytorch.py'
- HINT: This error might have occurred since this system does not have Windows Long Path support enabled. You can find information on how to enable this at https://pip.pypa.io/warnings/enable-long-paths
提示:由于此系统未启用 Windows 长路径支持,因此可能发生了此错误。您可以在 https://pip.pypa.io/warnings/enable-long-paths 找到有关如何启用此功能的信息
这是由于微软商店把python安装在了一个很奇怪的长路径'C:\\Users\\ysr21\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python312‘
卸载python, 去官网重新安装python就好了,transformers也能顺利装上了
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。