TensorFlow安装与配置
来源:互联网 发布:51talk软件下载 编辑:程序博客网 时间:2024/06/05 09:59
TensorFlow的安装和配置一直都是一件很繁琐的事情,我已经安装啦很多次,但是每次都还是在查询安装,为了自己和大家参考,在此写一下安装过程。
查看
1.安装anaconda
首先在官网(www.continuum.io/downloads)下载anaconda3到本地,在下载文件所在文件夹路径下执行以下操作:
bash Anaconda3-4.4.0-Linux-x86_64.sh
中间会出现两次选择:
(1)许可证
Do you approve the license terms? [yes|no]Please answer 'yes' or 'no':
输入:yes
(2)路径
Do you wish the installer to prepend the Anaconda3 install location to PATH in your /home/zcm/.bashrc ? [yes|no]
输入:yes
2.安装cuda
注意此处要关闭nvidia,使用操作:
exit X
首先下载cuda,然后执行操作:
sudo sh cuda_8.0.61_375.26_linux-run
接下来就是各种选择:
The NVIDIA CUDA Toolkit provides command-line and graphicaltools for building, debugging and optimizing the performanceof applications accelerated by NVIDIA GPUs, runtime and mathlibraries, and documentation including programming guides,Do you accept the previously read EULA?accept/decline/quit: acceptInstall NVIDIA Accelerated Graphics Driver for Linux-x86_64 375.26?(y)es/(n)o/(q)uit: yDo you want to install the OpenGL libraries?(y)es/(n)o/(q)uit [ default is yes ]: yDo you want to run nvidia-xconfig?This will update the system X configuration file so that the NVIDIA X driveris used. The pre-existing X configuration file will be backed up.This option should not be used on systems that require a customX configuration, such as systems with multiple GPU vendors.(y)es/(n)o/(q)uit [ default is no ]: yInstall the CUDA 8.0 Toolkit?(y)es/(n)o/(q)uit: yEnter Toolkit Location [ default is /usr/local/cuda-8.0 ]: Do you want to install a symbolic link at /usr/local/cuda?(y)es/(n)o/(q)uit: yInstall the CUDA 8.0 Samples?(y)es/(n)o/(q)uit: n
3.安装cudnn
首先在cudnn的下载文件夹路径中执行如下操作:
sudo cp *.tgz /usr/local/cuda/include/cd /usr/local/cuda/include/sudo tar -xzvf cudnn-8.0-linux-x64-v5.0-ga.tgzsudo chmod a+r /usr/local/cuda/include/cuda/include/cudnn.h /usr/local/cuda/include/cuda/lib64/libcudnn*
4.安装TensorFlow
首先安装pip,用于python3的一些安装,操作:
sudo apt install python3-pip
更新pip:
sudo apt-get updatesudo apt-get upgradewget https://bootstrap.pypa.io/get-pip.pysudo python3 get-pip.py
接下来安装tensorflow:
sudo pip install tensorflow_gpu-1.4.0rc1-cp36-cp36m-linux_x86_64.whl
查看python和tensorflow版本以及安装路径:
pythonimport tensorflow as tftf.__version__tf.__path__
查看cuda 版本
cat /usr/local/cuda/version.txt
cudnn 版本
cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2
阅读全文
0 0
- 【Tensorflow】Tensorflow安装与配置
- TensorFlow安装与配置
- TensorFlow的安装与配置
- Caffe与Tensorflow的安装与配置
- tensorflow入门(1)安装与配置
- Anaconda+Tensorflow环境安装与配置
- TensorFlow安装配置
- jetson tk1开发(4)-tensorflow安装与配置
- Ubuntu16.04下Anaconda3+tensorflow+Pycharm+Spyder安装与配置
- MAC上PyCharm调试Tensorflow的环境安装与配置
- Tensorflow下载与安装
- tensorflow安装与测试
- Tensorflow安装与测试
- TensorFlow安装与测试
- TensorFlow安装与测试
- Tensorflow安装与测试
- TensorFlow 安装与卸载
- TensorFlow安装与测试
- eclipse启动出现“An Error has Occurred. See the log file”解决方法
- 1.电子商务支付方式有哪些 2.比较不同支付方式的优势劣势
- SVN学习笔记
- ELK【1】
- 关于jdk1.8+jmter3.3安装配置问题小结
- TensorFlow安装与配置
- Android开发思维导图
- Android Studio完美打造Eclipse工程目录及自由调整Android.jar顺序
- vue中v-for循环列表根据条件判断两边对齐效果(常用)
- 欢迎使用CSDN-markdown编辑器
- windows上安装使用rabbitmq
- TMS28335GPIO及外部中断学习笔记
- 2017第十三届中国国际显示大会信息
- 关于AndroidStudio3.0 关闭模拟器黑屏卡死的问题