平臺:windows10
tensorflow-gpu-1.6.0升級tensorflow-gpu-1.10.0
問題:
無法卸載舊版本tensorflow-gpu-1.6.0,提示錯誤如下:
Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: 'C:\\Users\\***\\AppData\\Local\\Temp\\pip-uninstall-a92rh00z\\program files (x86)\\microsoft visual studio\\shared\\python36_64\\lib\\site-packages\\tensorflow\\contrib\\tensor_forest\\hybrid\\python\\models\\__pycache__\\stochastic_hard_decisions_to_data_then_nn.cpython-36.pyc'
解決方法
此錯誤爲路徑過長產生,可通過修改註冊表解決。註冊表值如下:
In the latest versions of Windows, this limitation can be expanded to approximately 32,000 characters. Your administrator will need to activate the “Enable Win32 long paths” group policy, or set the registry value to 1.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem@LongPathsEnabled
參考