Windows10下TensorFlow-GPU安装失败求助
Hey there, I’ve run into this exact headache with Windows + Anaconda + TensorFlow-GPU before, so let’s break down how to get your setup working smoothly.
First, Let’s Pinpoint the Core Issue
Your error stems from two main problems: a version mismatch between TensorFlow-GPU and your CUDA/CuDNN setup, plus potential missing system dependencies or misconfigured environment variables. Here’s how to fix each part step by step:
1. Install a TensorFlow-GPU Version Compatible with CUDA 8.0
When you run pip install tensorflow-gpu without specifying a version, it grabs the latest TensorFlow release—which no longer supports CUDA 8.0 (CUDA 8.0 works with TensorFlow 1.4.x to 1.10.x).
Activate your tensorflow-gpu environment and run this:
pip install tensorflow-gpu==1.10.0
This version is stable, supports Python 3.5/3.6, and plays perfectly with CUDA 8.0 + CuDNN 6.0.
2. Double-Check CUDA & CuDNN Setup
Make sure your CuDNN version matches TensorFlow 1.10.0 (you need CuDNN 6.0 for CUDA 8.0):
- Download CuDNN 6.0 for CUDA 8.0 (you’ll need an NVIDIA developer account)
- Extract the zip file, then copy the contents directly to your CUDA 8.0 installation folder:
- Copy
cudnn64_6.dllfrom the extractedbinfolder →C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\bin - Copy
cudnn.hfrom extractedinclude→C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\include - Copy
cudnn.libfrom extractedlib\x64→C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\lib\x64
- Copy
Then update your system environment variables (restart your computer after this—critical for changes to take effect!):
- Add
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\binto yourPATH - Add
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\lib\x64to yourPATH
3. Resolve Anaconda Environment Conflicts
Sometimes Anaconda’s default packages clash with TensorFlow. Run this in your activated environment to align dependencies:
conda install cudatoolkit=8.0 cudnn=6.0
This ensures your environment has the exact CUDA/CuDNN versions TensorFlow expects, eliminating hidden mismatches.
4. Install Required Visual C++ Redistributable
Windows needs the Visual C++ 2015/2017 Redistributable for TensorFlow’s DLLs to load properly. Download and install the x64 version of the Visual C++ Redistributable for Visual Studio 2017 (it’s backward-compatible with 2015 requirements).
5. Test Your Installation
After all steps, activate your environment and fire up Python:
import tensorflow as tf print(tf.__version__) print(tf.test.is_gpu_available())
If everything works, you’ll see True for the GPU check—confirming TensorFlow is successfully using your GTX 970.
内容的提问来源于stack exchange,提问作者Gaetan.S

