再Ubuntu22.04中安装tensorflow时发现使用命令
pip install tensorflow-gpu==2.12.0
安装时一直报错
而使用命令
pip install tensorflow==2.12.0
可以安装成功,此时使用命令
tf.config.list_physical_devices()
可以正常调用cuda。
这有一个重要的前提是与tensorflow2.12.0版本对应的cuda和cudnn已经安装,具体的对应版本见tensorflow官网。
再Ubuntu22.04中安装tensorflow时发现使用命令
pip install tensorflow-gpu==2.12.0
安装时一直报错
而使用命令
pip install tensorflow==2.12.0
可以安装成功,此时使用命令
tf.config.list_physical_devices()
可以正常调用cuda。
这有一个重要的前提是与tensorflow2.12.0版本对应的cuda和cudnn已经安装,具体的对应版本见tensorflow官网。