I was trying to download cudatoolkit on my environment variable on anaconda using this command (conda install -c conda-forge cudatoolkit=11.2) and when it finishes downloading and start extracting this error shows: """ Executing transaction: - "By downloading and using the CUDA Toolkit conda packages, you accept the terms and conditions of the CUDA End User License Agreement (EULA): https://docs.nvidia.com/cuda/eula/index.html"
done ERROR conda.core.link:_execute(745): An error occurred while installing package 'conda-forge::cudatoolkit-11.2.2-h933977f_10'. Rolling back transaction: done
LinkError: post-link script failed for package conda-forge::cudatoolkit-11.2.2-h933977f_10 location of failed script: C:\ProgramData\Anaconda3\envs\tf_gpu\Scripts.cudatoolkit-post-link.bat ==> script messages <== "By downloading and using the CUDA Toolkit conda packages, you accept the terms and conditions of the CUDA End User License Agreement (EULA): https://docs.nvidia.com/cuda/eula/index.html"
==> script output <== stdout: stderr: 'chcp' is not recognized as an internal or external command, operable program or batch file. 'chcp' is not recognized as an internal or external command, operable program or batch file. 'chcp' is not recognized as an internal or external command, operable program or batch file.
return code: 1
() """
I have been trying for days to use my gpu with tensorflow but I couldn't.
CodePudding user response:
The error message you are encountering is due to a failure in the post-installation script of the CUDA Toolkit. The error message states that 'chcp' is not recognized as a command, which suggests that the script is trying to run a Windows command prompt command that is not available in your environment.
One possible solution is to install the CUDA Toolkit manually, rather than using the conda package manager. You can download the CUDA Toolkit from the NVIDIA website and follow the instructions for installation.
Another possible solution is to create a new environment in Anaconda and try installing the CUDA Toolkit in the new environment. This can help isolate the issue and avoid conflicts with other packages in your current environment.
CodePudding user response:
It seems that the issue may be related to the post-link script for the cudatoolkit package failing, as indicated in the error message "post-link script failed for package conda-forge::cudatoolkit-11.2.2-h933977f_10". The error message also mentions that the 'chcp' command is not recognized, which suggests that there may be a problem with the environment variables.
You could try the following steps to resolve the issue:
Uninstall and reinstall the cudatoolkit and cudnn packages, making sure that you have the latest versions.
Check and make sure that all necessary environment variables have been set correctly, including the PATH variable which should contain the location of the CUDA Toolkit and cuDNN.
Try running the post-link script manually to see if you can identify the source of the error.
If the issue persists, you may want to consult the NVIDIA CUDA Toolkit documentation or seek assistance from the Anaconda or CUDA community forums.