安装miniconda、tensorflow、libcudnn

目录

安装miniconda

安装tensorflow

[安装 libcudnn](#安装 libcudnn)


安装miniconda

python 复制代码
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && bash Miniconda3-latest-Linux-x86_64.sh

安装tensorflow

tensorflow官网,查看版本对应

https://tensorflow.google.cn/install?hl=en

python 复制代码
pip install tensorflow-gpu==2.9.0 -i https://pypi.tuna.tsinghua.edu.cn/simple

使用 print(tf.config.list_physical_devices('GPU')) 查看GPU时报错

2024-01-23 14:37:14.298095: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudnn.so.8'; dlerror: libcudnn.so.8: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda-11.7/lib64:/usr/local/cuda-11.7/lib64:/usr/local/cuda-11.7/lib64

2024-01-23 14:37:14.298127: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1850] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform.

Skipping registering GPU devices...

安装 libcudnn

报以上错误是因为没有安装cudnn

下载网址:Index of /compute/cuda/repos/ubuntu2004/x86_64 (nvidia.com)

下载命令:

python 复制代码
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/libcudnn8_8.5.0.96-1+cuda11.7_amd64.deb

安装

python 复制代码
sudo dpkg -i libcudnn8_8.5.0.96-1+cuda11.7_amd64.deb

安装成功

相关推荐
Sinclair1 小时前
简单几步,安卓手机秒变服务器,安装 CMS 程序
android·服务器
木心月转码ing4 小时前
WSL+Cpp开发环境配置
linux
Rockbean1 天前
用40行代码搭建自己的无服务器OCR
服务器·python·deepseek
蝎子莱莱爱打怪1 天前
Centos7中一键安装K8s集群以及Rancher安装记录
运维·后端·kubernetes
茶杯梦轩1 天前
CompletableFuture 在 项目实战 中 创建异步任务 的核心优势及使用场景
服务器·后端·面试
崔小汤呀1 天前
最全的docker安装笔记,包含CentOS和Ubuntu
linux·后端
何中应1 天前
vi编辑器使用
linux·后端·操作系统
何中应1 天前
Linux进程无法被kill
linux·后端·操作系统
何中应1 天前
rm-rf /命令操作介绍
linux·后端·操作系统
何中应1 天前
Linux常用命令
linux·操作系统