jupyter notebook与tensorflow的安装与使用

(已废除)超简单使用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,显示如下界面测试成功

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Discoverhub

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值