ubuntun 18.04 desktop安装jupyter-notebook

在ubuntu18.04要安装jupyter-notebook,当然前提是先安装python,然后按如下步骤安装jupyter-notebook,现在记录如下:

1.sudo apt-get update

2.sudo apt-get  upgrade

3.sudo apt-get install jupyter-notebook

4.配置jupter-notebook,

运行 sudo jupyter-notebook -generate-config --allow-root,自动生成~/.jupyter/jupyter-notebook-config.py

5. 用文本编辑器编辑刚才生成的配置文件jupyter-notebook-config.py,修改文件中如下参数

c.NotebookApp.notebook_dir = '/home/<当前用户>/work'
设置默认路径:(建议使用绝对路径,~在配置中代表默认工作区,如果不是第一次设置容易出错)
6.设置noteboook登录密码
c.NotebookApp.token='登陆密码'  如果设置为空'',则运行则不需要密码

7.修改远程访问配置

c.NotebookApp.ip = '*'   这个‘*'就表示任何IP可以访问该jupyter服务’

c.NotebookApp.port=8888 .默认为8888

8.开启jupyter-notebook服务

sudo jupyter-notebook --allow-root
 
9在浏览器就可以通过本机ip和设置的port就可以正常访问jupyter-notebook操作python
 
 
 

 

posted @ 2018-10-25 19:23  中国人醒来了  阅读(3907)  评论(0编辑  收藏  举报