Jupyter配置
Termux下
安装 libzmq
之前报错就是因为没有libzmq,pip安装的时候没法编译
安装jupyter
生成配置文件
1
| jupyter notebook --generate-config
|
默认生成在 ~/.jupytercd ~/.jupyter
使用 ipython
生成密匙
1 2
| from notebook.auth import passwd passwd()
|
按提示输入密码,复制生成的字符串(例如’sha1:aabbcc00’)
编辑 jupyter_notebook_config.py
添加刚刚生成的密匙
1 2 3 4 5 6 7 8
| c.NotebookApp.password = 'sha1:aabbcc00'
c.NotebookApp.ip='*'
c.NotebookApp.open_browser = False
c.NotebookApp.port =8888
|
(以下为个人配置)设置别名
1 2 3
| mkdir ~/.jupyter/leo vi ~/.zshrc alias myjupyter="jupyter notebook --notebook-dir /data/data/com.termux/files/home/.jupyter/leo & sleep 1; termux-open http://127.0.0.1:8880”
|
安装插件
1
| pip install jupyter_contrib_nbextensions && jupyter contrib nbextension install
|