记录22.6.5--在python3.9.13中安装tensorflow时遇到的问题
使用pip在命令行安装tensorflow 报错
ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: ‘C:\Users\86136\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\tensorflow\include\external\com_github_grpc_grpc\src\core\ext\filters\client_channel\lb_policy\grpclb\client_load_reporting_filter.h’
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 10 版本 1607 开始,MAX_PATH限制已从常见的 Win32 文件和目录函数中删除,因此需要启用长路径。
win+r打开运行界面,键入REGEDIT,找到以下位置:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem