关于最新Aanaconda3 运行jupyter notebook一直跳转到 file:///C:/Users/xxxx/.../runtime/jpserver-17224-open.html的问题

这两天装Anaconda跑测试环境 发现 新安装的jupyter notebook 一直跳转到C:\Users\240712\AppData\Roaming\jupyter\runtime目录下面的.html文件 而不是跳转到设置的jupyter工作路径 昨天找了一天bug 今天终于解决了

这是我自己设置的工作目录路径 

## DEPRECATED, use root_dir.
#  Default: ''
c.ServerApp.notebook_dir = 'D:\Jupyter'

 在jupyter_notebook_config.py文件中把 c.ServerApp.use_redirect_file = True 更改为 c.ServerApp.use_redirect_file = False 注意到 去掉# 顶格写

(没有这个文件的可以去自己搜一下 去prompt 命令里面 运行一下jupyter notebook --generate-config)

#  Default: True
c.ServerApp.use_redirect_file = False

我用的是谷歌默认浏览器

如果发现浏览器都跳转不出来 参考我的.py文件

import webbrowser
webbrowser.register("chrome",None,webbrowser.GenericBrowser("C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe"))
c.NotebookApp.browser = 'chrome'

# Configuration file for notebook.

c = get_config()  #noqa

#------------------------------------------------------------------------------
# Application(SingletonConfigurable) configuration
#------------------------------------------------------------------------------

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

康康今天学习了么

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值