Winodws10子系统openSUSE安装jupyter

一、安装

pip install jupyter

二、生成配置文件

jupyter notebook --generate-config
Writing default config to: /root/.jupyter/jupyter_notebook_config.py

三、编辑配置文件

vim /root/.jupyter/jupyter_notebook_config.py
约204行,登录IP地址限制的取消
## The IP address the notebook server will listen on.
#c.NotebookApp.ip = 'localhost'
c.NotebookApp.ip = '*'


约266行,目录设置
## The directory to use for notebooks and kernels.
#c.NotebookApp.notebook_dir = ''
c.NotebookApp.notebook_dir = '/mnt/d/程序缓存/jupyter'

约274行,是否启动时打开浏览器
#c.NotebookApp.open_browser = True
c.NotebookApp.open_browser = False

约284行,密码设置
#  The string should be of the form type:salt:hashed-password.
#c.NotebookApp.password = ''
c.NotebookApp.password = 'sha1:6aec1c232c69:bc2ef2e22cc276453ab3b5eafd476d12bc5c7852'

生成密码字符串方式
Python 3.6.9 (default, Oct 29 2019, 10:39:36) [GCC] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 
>>> from notebook.auth import passwd
>>> passwd()
Enter password: 
Verify password: 
'sha1:6aec1c232c69:bc2ef2e22cc276453ab3b5eafd476d12bc5c7852'
>>> 



约297行,端口号
## The port the notebook server will listen on.
#c.NotebookApp.port = 8888

## The port the notebook server will listen on.
c.NotebookApp.port = 8888

四、保存退出,启动

nohup jupyter notebook --allow-root &

nohup jupyter notebook --allow-root > jupyter_out.log 0>&1 &
nohup jupyter notebook --allow-root > jupyter_out.log 2>&1 &

或者

jupyter notebook --allow-root


jobs -l

kill
DESKTOP-R5E7NDM:/mnt/d/程序缓存/linux # jupyter notebook --allow-root
[I 08:53:54.399 NotebookApp] Writing notebook server cookie secret to /root/.local/share/jupyter/runtime/notebook_cookie_secret
[I 08:53:58.446 NotebookApp] Serving notebooks from local directory: /mnt/d/程序缓存/jupyter
[I 08:53:58.446 NotebookApp] The Jupyter Notebook is running at:
[I 08:53:58.446 NotebookApp] http://localhost:8888/
[I 08:53:58.446 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值