为了运行论文源码,需要配置如下环境:

基于 anaconda3 安装 tensorflow 1.4 + cuda 8.0

1. 安装anaconda3

https://blog.csdn.net/qq_15192373/article/details/81091098

2. 安装显卡驱动

检查显卡和推荐驱动:

输入ubuntu-drivers devices
基于 anaconda3 安装 tensorflow 1.4 + cuda 8.0

选择435版本

添加apt-get的清华源,使安装速度更快:https://blog.csdn.net/qq_41822647/article/details/85122467

然后使用如下命令安装,这一步时间较长

sudo apt-get install nvidia-driver-435

3. 创建python环境

创建名为test的虚拟环境:

基于 anaconda3 安装 tensorflow 1.4 + cuda 8.0

安装tensorflow:

如果下载安装tensorflow太慢的话,可以指定为清华的源

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --upgrade tensorflow-gpu==1.4

基于 anaconda3 安装 tensorflow 1.4 + cuda 8.0

安装cuda 8.0:

conda install cudatoolkit=8.0 -c https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/linux-64/

基于 anaconda3 安装 tensorflow 1.4 + cuda 8.0

(安装可能中断,继续尝试)

安装cudnn:

判断需要安装哪个版本的cudnn:

输入python

基于 anaconda3 安装 tensorflow 1.4 + cuda 8.0

输入import tensorflow as tf

基于 anaconda3 安装 tensorflow 1.4 + cuda 8.0

报错libcudnn.so.6文件不存在,那就安装cudnn 6

conda install cudnn=6

基于 anaconda3 安装 tensorflow 1.4 + cuda 8.0

4. 安装Scikit-learn

改成清华大学的镜像源:

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/

conda config --set show_channel_urls yes

conda install -c anaconda scikit-learn

基于 anaconda3 安装 tensorflow 1.4 + cuda 8.0

这里没安装论文要求的版本,因为安装后会出问题,暂时就安装自动推荐的版本,后续有问题再说 。

5. 测试

基于 anaconda3 安装 tensorflow 1.4 + cuda 8.0

基于 anaconda3 安装 tensorflow 1.4 + cuda 8.0

大功告成!

相关文章:

  • 2021-06-12
  • 2021-05-02
  • 2021-07-22
  • 2021-09-30
  • 2021-08-14
  • 2021-05-31
  • 2021-10-23
  • 2022-01-19
猜你喜欢
  • 2021-10-31
  • 2021-11-08
  • 2021-08-08
  • 2021-07-20
  • 2022-12-23
相关资源
相似解决方案