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).

 

你可能感兴趣的:(Winodws10子系统openSUSE安装jupyter)