linux下tensorflow安装

本文详细介绍了在Linux系统中安装TensorFlow的两种方法:通过pip安装二进制文件和从源码编译安装。对于源码安装,包括了JDK8、bazel、CUDA和cudnn的安装步骤,以及在Anaconda环境中安装TensorFlow的注意事项。同时,针对安装过程中可能遇到的MKL支持问题和动态库找不到的问题,提供了相应的解决方案。
摘要由CSDN通过智能技术生成

如无特殊说明,所有操作都在Linux系统上完成,并假定只有普通用户权限。(仅有CUDA和cudnn安装需要用到管理员权限)

一、 安装TensorFlow

1. 使用pip从二进制文件安装

注意:

  • 最新版本的二进制文件链接地址,可以通过TensorFlow官网获取 https://www.tensorflow.org/install/install_linux
  • 请安装最新版的pip,或者使用pip install –upgrade pip来进行更新
  • 如果安装GPU版本,请确认已经提前安装配置好CUDA

Python 2.7

// CPU版本
pip install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.4.0-cp27-none-linux_x86_64.whl

// GPU版本
pip install https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.4.0-cp27-none-linux_x86_64.whl

Python 3.4

// CPU版本
pip install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.4.0-cp34-cp34m-linux_x86_64.whl

// GPU版本
pip install https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.4.0-cp34-cp34m-linux_x86_64.whl

Python 3.5

// CPU版本
pip install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.4.0-cp35-cp35m-linux_x86_64.whl

// GPU版本
pip install https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.4.0-cp35-cp35m-linux_x86_64.whl

Python 3.6

// CPU版本
pip install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.4.0-cp36-cp36m-linux_x86_64.whl

// GPU版本
pip install https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.4.0-cp36-cp36m-linux_x86_64.whl
2. 从源码安装
2.1 安装JDK8

从官网

  • 11
    点赞
  • 74
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值