ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: ‘c:\\users

ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: 'c:\users\xiahuadong\desktop\xiahuadongcode\algorithm_ai\models-research-deep_speech\venv\Lib\site-packages\tensorflow\include\external\llvm-project\mlir\_virtual_includes\LinalgStructuredInterfacesIncGen\mlir\Dialect\Linalg\IR\LinalgStructuredOpsInterfaces.cpp.inc’问题解决:

问题

因为Python Page模块文件的文件路径太长,如果超过了260个字符这文件不能被创建成功。所以需要解决Windows中对长文件名的限制问题。通过修改注册表中 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem 的LongPathsEnabled 值由0改为1

解决办法

打开注册表

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-bqykMGw4-1612678469724)(C:\Users\xiahuadong\Documents\csdn博客\Could not install packages due to an OSError [Errno 2] No such file or directory1.png)]

修改

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystemLongPathsEnabled值为 1
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-njZRemke-1612678469726)(C:\Users\xiahuadong\Documents\csdn博客\Could not install packages due to an OSError [Errno 2] No such file or directory 2.png)]

重启计算机

猜你喜欢

转载自blog.csdn.net/weixin_44493841/article/details/113740282