【深度学习】tensorflow安装+Uabntu20+RTX2070显卡驱动安装

先跟着这个走

使用 pip 安装 TensorFlow

有问题再看我下面。

我自己之前安装jupyter,创建了一个python3.8.10的环境,不然jupyter中就没有python3.8.10安装的那些包。

jupyter里面import安装好的包出错问题怎么办_人工智障1025的博客-CSDN博客

和上面安装tensorflow中的venv环境一样,我用了下面的这个python3.8.10环境

在终端输入如下

conda activate python3.8.10

pip install tensorflow -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

安装好了tensorflow后:

终端输入打开:

jupyter notebook

jupyter网页输入:

import tensorflow as tf

运行报错:

IPKernelApp] WARNING | No such comm: 9160186d-4031-49e9-9783-31c69897fd3d
2022-05-19 16:31:26.699015: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library ‘libcudart.so.11.0’; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory
2022-05-19 16:31:26.699039: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.

解决过程:

Ubuntu18.04.2安装RTX2070深度学习环境 – 知乎

自己是Uabntu20的系统,RTX2070的显卡

安装显卡驱动

 之前这一步一直没成功,报dpkg什么错,跟着这个人把源换了,附加驱动就显示除了很多可以用的驱动!原来只有2个,还没办法选!

但是又遇到了问题:

nvidia-smi

提示:

NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.

为了解决这个问题试了很多种方法,最终要放弃了,屏幕分辨率变糊了想要调回来,发现了

​​​​​​​​​​​​ubuntu18.04安装nvidia驱动后分辨率低下、显卡驱动无法找到设备问题_guzhongdide_的博客-CSDN博客_ubuntu安装nvidia驱动后分辨率变低

解决:ubantu关闭secure boot :

1.首先进入终端输入:

sudo apt install mokutil
sudo mokutil --disable-validation

2.再重启电脑

reboot

3.此时电脑重启,出现蓝屏,按任意键,出现四个选项:选择change secure boot state

  • Continue boot
  • Change Secure Boot state
  • Enroll key from disk
  • Enroll hash from disk

4.出现Enter password character (num)

这个num可能是1.3.5.4各个字母,代表的是你之前输入密码的第几个字母,然后然后把这个字母输入就好了

5.Disable Secure Boot

选择yes

6.回到最开始页面,选择reboot

重新打开电脑,分辨率变得非常清晰!

nvidia-smi也有了!

上帝!

文章出处登录后可见!

已经登录?立即刷新

共计人评分,平均

到目前为止还没有投票!成为第一位评论此文章。

(0)
青葱年少的头像青葱年少普通用户
上一篇 2022年5月23日
下一篇 2022年5月25日

相关推荐