使用pip在命令行安装tensorflow 报错
ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: ‘C:Users86136AppDataLocalPackagesPythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0LocalCachelocal-packagesPython39site-packagestensorflowincludeexternalcom_github_grpc_grpcsrccoreextfiltersclient_channellb_policygrpclbclient_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_MACHINESYSTEMCurrentControlSetControlFileSystem。
找到LongPathsEnabled的条目,双击打开,在“值”数据字段中,输入值1。这将启用“长路径”选项。
使用豆瓣源加速安装:
pip3 install --user --upgrade tensorflow -i https://pypi.douban.com/simple



