jupyter修改密码后无法启动服务器,搭建jupyter远程连接服务器
在服務器上做如下操作
1)生成配置文件
$jupyter notebook --generate-config
2)生成密碼(后續寫配置文件、登錄Jupyter notebook需要)
打開python終端
In [1]: from IPython.lib import passwd
In [2]: passwd()
Enter password:
Verify password:
Out[2]: 'sha1:一些數字字母'
3)修改默認配置文件
$vim ~/.jupyter/jupyter_notebook_config.py
進行如下修改(這里可以自行配置):
c.NotebookApp.ip='*'
c.NotebookApp.password = 'sha1:一些數字字母'
c.NotebookApp.open_browser = False
c.NotebookApp.port =8889 #隨便指定一個端口
c.IPKernelApp.pylab = 'inline'
可能還需要設置c.NotebookApp.token = ''
4)啟動Jupter notebook
$jupyter notebook
5)遠程訪問
此時應該可以直接從本地瀏覽器直接訪問http://address_of_remote:8889就可以看到jupyter的登陸界面。(ps:服務器上的Jupyter notebook不要關, 可以開啟screen會話創建一個jupyter專屬會話做到)
總結
以上是生活随笔為你收集整理的jupyter修改密码后无法启动服务器,搭建jupyter远程连接服务器的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 如何读取服务器的文件夹大小,请教如何获取
- 下一篇: .bash_profile 写入时间格式