简体   繁体   中英

How to install tensorflowgpu-version with lower(compatible) version of cudatoolkit and cudnn

Every time I install tensorflow-gpu on anaconda its automatically installing tensorflow-gpu with the most updated available version of cudatoolkit and cudnn evens if it's not compatible with graphic card and cuda which I have already installed on my computer, which creates a big problem later on in simulations.

For example I have RTX3060 and I am installing tensorflow-gpu 2.5.0 , I have already installed cuda 11.1 but when I install it with anaconda as

"conda install tensorflow-gpu=2.5.0" 

It will install cudatoolkit 11.3.x ... and the most advanced available cudnn

You can install tensorflow-gpu with the following commands with compatible cudatoolkit and cudnn versions.

conda install -c conda-forge cudatoolkit=11.2 cudnn=8.1.0
#It is recommended to use pip to install TensorFlow since it is  officially released to PyPI.
python3 -m pip install tensorflow-gpu==2.5.0
# Verify install:
python3 -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))"

For step-by-step instructions, please refer to this link .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM