Apparently, Conda installations with very long file or directory paths have a known bug on Windows.
If you install a package that triggers the issue, Conda will throw a somewhat misleading CondaVerificationError
. For example:
CondaVerificationError: The package for tensorflow-gpu located at C:\Users\bri11091\AppData\Local\ESRI\conda\pkgs\tensorflow-gpu-2.5.0-py37_cuda11.1_cudnn8.1_5
appears to be corrupted. The path 'Lib/site-packages/tensorflow/include/external/cudnn_frontend_archive/_virtual_includes/cudnn_frontend/third_party/cudnn_frontend/include/cudnn_frontend_EngineConfig.h'
specified in the package manifest cannot be found.
The bug is tracked in the GitHub issue below.
As pointed out here (under Known Issues), this bug stems from the limited default Windows max path length. To fix it, we have to configure Windows to allow long paths. E.g. by running this PowerShell command.
New-ItemProperty `
-Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" `
-Name "LongPathsEnabled" `
-Value 1 `
-PropertyType DWORD `
-Force
Allowing long paths requires administrative privileges.