安装TensorFlow-gpu最大的问题就是显卡驱动版本与软件包中不匹配。这个python程序可以检测目前系统中的显卡驱动。由于条件限制,目前只能支持Windows系统。希望可以帮助到大家。
# -*- coding: utf-8 -*-
import os
import re
import subprocess
import io
import platform
if platform.system() != "Windows":
print("目前只支持windows平台")
exit(-1)
driver_runtime=[
[441.22,'10.2.89'],
[418.96,'10.1.105'],
[411.31,'10.0.130'],
[398.26,'9.2.148'],
[397.44,'9.2.88'],
[391.29,'9.1.85'],
[385.54,'9.0.76'],
[376.51,'8.0.61'],
[369.30,'8.0.44'],
[353.66,'7.5.16'],
[347.62,'7.0.28']
]
'''
CUDA Toolkit Linux x86_64 Driver Version Windows x86_64 Driver Version
CUDA 10.2.89 >= 440.33 >= 441.22
CUDA 10.1 (10.1.105 general release, and updates) >= 418.39 >= 418.96
CUDA 10.0.130 >= 410.48 >= 411.31
CUDA 9.2 (9.2.148 Update 1) >= 396.37 >&#