CentOS安装Anaconda、配置jupyter notebook、并打开ipynb文件
2018-03-30 00:00
1426 查看
Anaconda的安装在她的官网上介绍的非常详细,按照官方指定步骤安装完事大吉。
Anaconda集成了jupyter notebook,所以在安装完成之后只需要配置就行了。
http://www.brianlv.com/20170401.html
https://www.cnblogs.com/jackzone/p/8387635.html
配置jupyter notebook的过程借鉴了以上两篇文章,但是因为我是在root用户下进行的安装所以路径有出入:
我们首先要生成一个jupyter的配置文件。
然后我们为了比较安全的访问服务器资源,我们需要设置登录密码和设置https来实现安全登录。如果有条件可以通过安全认证中心来发放秘钥和认证。首先打开ipython,生成sha1的密码,如下:
然后生成一个自签名认证的key,如下:
最后如下配置即可:
由于jupyter使用的8888作为默认端口,所以我需要把端口给开放并重启防火墙(或者直接关闭防火墙)。通过如下代码设置:
到这里所有的安装和基本的设置都已经完成,可以在命令行输入:jupyter notebook以使用了。
安装配置好jupyter notebook之后,就可以打开ipynb文件了。
打开jupyter notebook,点击右上角的upload上传按钮,就可以上传你电脑上的.ipynb 文件,上传后可直接打开,显示如下界面:
Anaconda集成了jupyter notebook,所以在安装完成之后只需要配置就行了。
http://www.brianlv.com/20170401.html
https://www.cnblogs.com/jackzone/p/8387635.html
配置jupyter notebook的过程借鉴了以上两篇文章,但是因为我是在root用户下进行的安装所以路径有出入:
我们首先要生成一个jupyter的配置文件。
jupyter notebook --generate-config #生成的config file在/root/.jupyter/jupyter_notebook_config.py |
from notebook.auth import passwd passwd() #Enter password #output sha1:49acd1a985cc:beb1fb6859665bfa721e65e78fc511c41basdasa. |
openssl req -x509 -nodes -days 365 -newkey rsa:4096 -keyout jkey.key -out jcert.pem |
emacs /home/user/.jupyter/jupyter_notebook_config.py c.NotebookApp.password = 'sha1:<your-sha1-hash-value>' c.NotebookApp.port = 8888 c.NotebookApp.ip = '*' c.NotebookApp.open_browser = False c.NotebookApp.certfile = '/root/jcert.pem' c.NotebookApp.keyfile = '/root/jkey.key' #保存退出
添加环境变量
export PATH=/root/anaconda3/bin:$PATH source ~/.bash_profile
运行代码
jupyter notebook --ip=0.0.0.0 --no-browser --allow-root
在本地浏览器运行
打开浏览器输入http://xxx.xxx.xxx.xxx:8888/ (XXX为ip地址)由于jupyter使用的8888作为默认端口,所以我需要把端口给开放并重启防火墙(或者直接关闭防火墙)。通过如下代码设置:
firewall-cmd --zone=public --add-port=8888/tcp --permanent systemctl restart firewalld.service |
安装配置好jupyter notebook之后,就可以打开ipynb文件了。
打开jupyter notebook,点击右上角的upload上传按钮,就可以上传你电脑上的.ipynb 文件,上传后可直接打开,显示如下界面:
相关文章推荐
- windows下安装双版本anaconda,以及配置jupyter notebook的kernel
- 实验教程1:如何在阿里云服务器ECS上安装anaconda,配置远程访问的jupyter notebook
- 在windows中打开ipynb文件 ipython notebook jupyter
- windows下安装双版本anaconda,以及配置jupyter notebook的kernel
- 打开ipynb文件——Jupyter Notebook——怎么设置路径
- Anaconda安装配置&jupyter notebook使用
- Python安装 Anaconda 以及jupyter notebook配置
- 用jupyter notebook打开.ipynb文件
- jupyter notebook配置文件修改注意事项--远程访问
- 深度学习环境搭建:linux下 Ubuntu16.04+cuda8.0+cudnn+anaconda+tensorflow并配置远程访问jupyter notebook
- 深度学习环境搭建:linux下 Ubuntu16.04+cuda8.0+cudnn+anaconda+tensorflow并配置远程访问jupyter notebook
- 在centos7 下安装Anaconda 启动jupyter notebook
- ubuntu系统下安装anaconda2并配置tensorflow环境及jupyter notebook工具远程登陆来开发用于深度学习环境
- jupyter notebook的安装、配置
- 在centos7服务器上安装anaconda和jupyter notebook
- anaconda2 打开jupyter Notebook及简单使用
- 安装配置远程jupyter notebook(原ipython notebook)
- anaconda2 打开jupyter Notebook及简单使用
- win10安装anaconda,nb_conda (jupyter notebook extension) 装不上的解决方法
- ubuntu下安装Anaconda后打不开ipython notebook (jupyter notebook)