1、进入下载了anaconda2安装包的目录,然后输入以下命令
lixingbao@lixingbao-System-Product-Name:~/下载$ bash Anaconda2-5.3.1-Linux-x86_64.sh
Do you accept the license terms? [yes|no]
[no] >>>
Please answer 'yes' or 'no':'
>>>yes
Anaconda2 will now be installed into this location:
/home/lixingbao/anaconda2
- Press ENTER to confirm the location
- Press CTRL-C to abort the installation
- Or specify a different location below
[/home/lixingbao/anaconda2] >>>
PREFIX=/home/lixingbao/anaconda2
installing: python-2.7.15-h1571d57_0 ...
Python 2.7.15 :: Anaconda, Inc.
........
Do you wish the installer to initialize Anaconda2
in your /home/lixingbao/.bashrc ? [yes|no]
[no] >>> yes
2.安装tensorflow
$ conda create -n tensorflow python=2.7 (跟你的python版本有关)
source activate tensorflow #激活该环境
(退出tensorflow环境用source deactivate)
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple tensorflow-gpu==1.2.0 #安装tensorflow1.2.0
3.可以打开anaconda-navigaton进入tensorflow环境,但不点击install spyder,直接打开pycharm导入tensorflow环境即可。
我这里导入的环境路径是:/home/lixingbao/anaconda2/envs/tensorflow/bin/python2.7
4.参考来源
https://blog.youkuaiyun.com/wanglingganggg/article/details/75043062