ubuntu16.04安装tensorflow
2017-12-08 11:21
232 查看
Take the following steps to install TensorFlow with Virtualenv:
Install pip and virtualenv by issuing one of the following commands:
Create a virtualenv environment by issuing one of the following commands:
where
进入你想安装tensorflow的父目录下,然后执行下面命令建立虚拟环境:
Activate the virtualenv environment by issuing one of the following commands:
The preceding source command should change your prompt to the following:
Issue one of the following commands to install TensorFlow in the active virtualenv environment:<
4000
/p>
If the preceding command succeeds, skip Step 6. If the preceding command fails, perform Step 6.
(Optional) If Step 5 failed (typically because you invoked a pip version lower than 8.1), install TensorFlow in the active virtualenv environment by issuing a command of the following format:
where
here. For example, if you are installing TensorFlow for Linux, Python 3.4, and CPU-only support, issue the following command to install TensorFlow in the active virtualenv environment:
在python shell环境中测试:
Install pip and virtualenv by issuing one of the following commands:
$ sudo apt-get install python-pip python-dev python-virtualenv # for Python 2.7 $ sudo apt-get install python3-pip python3-dev python-virtualenv # for Python 3.n
Create a virtualenv environment by issuing one of the following commands:
$ virtualenv --system-site-packages targetDirectory # for Python 2.7 $ virtualenv --system-site-packages -p python3 targetDirectory # for Python 3.n
where
targetDirectoryspecifies the top of the virtualenv tree. Our instructions assume that
targetDirectoryis
~/tensorflow, but you may choose any directory.
创建 Virtualenv 虚拟环境:
进入你想安装tensorflow的父目录下,然后执行下面命令建立虚拟环境:$ source ~/tensorflow/bin/activate # bash, sh, ksh, or zsh $ source ~/tensorflow/bin/activate.csh # csh or tcsh
The preceding source command should change your prompt to the following:
(tensorflow)$
Issue one of the following commands to install TensorFlow in the active virtualenv environment:<
4000
/p>
(tensorflow)$pip install --upgrade tensorflow # for Python 2.7
(tensorflow)$pip3 install --upgrade tensorflow # for Python 3.n
(tensorflow)$pip install --upgrade tensorflow-gpu # for Python 2.7 and GPU
(tensorflow)$pip3 install --upgrade tensorflow-gpu # for Python 3.n and GPU
If the preceding command succeeds, skip Step 6. If the preceding command fails, perform Step 6.
(Optional) If Step 5 failed (typically because you invoked a pip version lower than 8.1), install TensorFlow in the active virtualenv environment by issuing a command of the following format:
(tensorflow)$pip install --upgrade tfBinaryURL # Python 2.7
(tensorflow)$pip3 install --upgrade tfBinaryURL # Python 3.n
where
tfBinaryURLidentifies the URL of the TensorFlow Python package. The appropriate value of
tfBinaryURLdepends on the operating system, Python version, and GPU support. Find the appropriate value for
tfBinaryURLfor your system
here. For example, if you are installing TensorFlow for Linux, Python 3.4, and CPU-only support, issue the following command to install TensorFlow in the active virtualenv environment:
(tensorflow)$pip3 install --upgrade \ https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.4.0-cp34-cp34m-linux_x86_64.whl[/code]
If you encounter installation problems, seeCommon Installation Problems.在终端执行如下命令进入python shell环境:
测试安装:
相关文章推荐
- Ubuntu16.04环境下安装CUDA、cudnn、Caffe、Tensorflow、pytorch
- tensorflow之faster rcnn 安装(ubuntu16.04版)
- Ubuntu16.04+python3.5+AMD安装tensorflow
- ubuntu16.04下安装TensorFlow(GPU加速)----详细图文教程
- ubuntu16.04安装gpu版本的tensorflow
- ubuntu16.04上安装CUDA8.0 + cuDNN v6 + tensorflow-gpu1.4
- ubuntu16.04 从源码安装tensorflow-gpu r1.4版本---2017-12-07
- ubuntu16.04下安装TensorFlow(GPU加速)
- ubuntu16.04安装配置tensorflow以后,每次开启都显示错误,需要设置变量
- Ubuntu 16.04 下安装Tensorflow-gpu
- ubuntu16.04 安装Tensorflow(GTX980Ti+CUDA8.0+CUDNNv6.0)
- Ubuntu 16.04 安装 TensorFlow(GPU支持)
- 在Ubuntu16.04下安装TensorFlow
- ubuntu16.04下安装TensorFlow(GPU加速)----详细图文教程
- Ubuntu 16.04 源码安装CPU版tensorflow
- ubuntu 16.04 安装 tensorflow (cpu)
- Tensorflow Ubuntu16.04上安装及CPU运行Tensorboard、CNN、RNN图文教程
- [置顶] Ubuntu 16.04最简单的tensorflow-gpu安装教程
- Ubuntu16.04+Tensorflow(GPU)安装教程