jupyter notebook远程访问不了的问题解决 |
您所在的位置:网站首页 › win7远程打开了还是无法远程 › jupyter notebook远程访问不了的问题解决 |
jupyter notebook非常方便,想在服务器上面搭建一个,但是访问不了。 (一)首先是安装jupyter notebook, pip install jupyter 如果pip安装报错,缺少sqlite的库,那么请安装 sudo apt-get install libsqlite3-dev 然后需要 “重新编译python”,再通过pip安装(python3.x则不需要安装pysqlite) pip install pysqlite (二)启动jupyter jupyter notebook 其实这时候,local如果有browser的话,就可以输入访问了,但是没有,所以需要远程访问: http://ip:8888,发现访问不了(三)配置远程访问jupyter 1)首先输入ipython生成秘钥 $ ipython from notebook.auth import passwd passwd()设定一个密码,会生成一个sha1的秘钥,如下图:2)生成jupyter的config文件 $ jupyter notebook --generate-config这时候会生成配置文件,在 ~/.jupyter/jupyter_notebook_config.py3)修改配置文件:~/.jupyter/jupyter_notebook_config.py $vim ~/.jupyter/jupyter_notebook_config.py加入如下内容,其中sha1那一串秘钥是上面生成的那一串 c.NotebookApp.ip='*' c.NotebookApp.password = u'sha1:f9030dd55bce:75fd7bbaba41be6ff5ac2e811b62354ab55b1f63' c.NotebookApp.open_browser = False c.NotebookApp.port =8888如图:
4)启动jupyter $jupyter notebook在远程电脑上,打开浏览器,输入: http://your-server-ip:8888需要输入密码,就是上面设置的那个密码,输入即可 5)OK了。 |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |