(已废除)超简单使用anaconda安装TensorFlow
按照网上说的:
安装非常简单,只需要在终端输入:
pip install –upgrade pip //更新pip
pip install jupyter
错误提示:
Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-build-wP_TsK/tornado/
打开jupyter notebook 也只需要在终端输入:
jupyter notebook
百度试了很多办法,决定放弃pip
改用anaconda
wget https://3230d63b5fc54e62148e-c95ac804525aac4b6dba79b00b39d1d3.ssl.cf1.rackcdn.com/Anaconda-2.3.0-Linux-x86.sh
bash Anaconda-2.3.0-Linux-x86_64.sh
conda install jupyter
安装完了执行:
jupyter notebook
还是有错误(原因在于anacinda安装失败),重新来:
分隔符**********(以下是最终的解决办法)
1、先安装conda
https://conda.io/docs/user-guide/install/linux.html#install-linux-silent
选择miniconda,下载文件
2、
bash Miniconda3-latest-Linux-x86_64.sh
一直选yes
3、测试是否成功
conda list
显示一堆包,就是ok的
4、安装jupyter
conda install jupyter
没报错就安装成功啦
使用:
jupyter notebook
就可以愉快的玩耍了
出现问题:新建项目后出现提示:
Jupyter Notebook调试 报错: The kernel has died, and the automatic restart has failed.
The kernel has died, and the automatic restart has failed. It is possible the kernel cannot be restarted. If you are not able to restart the kernel, you will still be able to save the notebook, but running code will no longer work until the notebook is reopened.
解决办法:
注意到终端里面显示到了路径,有python2python3,所以考虑是python的环境问题,于是将~/.bashrc里的路径全注释掉,就可以了
顺便安装tensorflow
1、创建一个conda 计算环境(python版本改为3.6.3)
conda create -n tensorflow python=3.6.3
在终端输入 python
就知道当前python 的版本了
2、激活计算环境
source activate tensorflow
3、安装
sudo pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.8.0-cp27-none-linux_x86_64.whl
若出现错误,重复该条,知道报出成功
安装完成后,在命令行输入python,进入python编辑界面,在>>后输入:import tensorflow,显示如下界面测试成功