Windows11安装python模块transformers报错Long Path处理

Windows11安装python模块transformers报错,报错信息如下

ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: 'C:\\Users\\27467\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\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

image
问题原因:要启用Windows长路径支持
处理方法
win+r输入打开注册表

regedit

修改以下指为1

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem]
"LongPathsEnabled"=1

image

posted @ 2023-08-10 14:26  minseo  阅读(987)  评论(0编辑  收藏  举报