[英]How to open jupyter on google chrome incognito mode
I am using win10, my default browser is chrome.我用的是win10,默认浏览器是chrome。
When I run the following command python -m notebook
google chrome pop up.当我运行以下命令时python -m notebook
google chrome 弹出。 In the jupyter_notebook_config.py
I have not modified anything yet, I just tried the following but unfortunately it is not working:在jupyter_notebook_config.py
我还没有修改任何东西,我只是尝试了以下但不幸的是它不起作用:
## Specify what command to use to invoke a web browser when opening the notebook.
# If not specified, the default browser will be determined by the `webbrowser`
# standard library module, which allows setting of the BROWSER environment
# variable to override it.
# Default: ''
c.NotebookApp.browser = 'C:/Program Files/Google/Chrome/Application/chrome.exe -incognito %s'
You just need to copy it to the .py
file.您只需要将其复制到.py
文件中。
import webbrowser
webbrowser.register('private_chrome', None, webbrowser.get('"' + 'C:/Program Files/Google/Chrome/Application/chrome.exe' +'" -incognito %s'))
c.NotebookApp.browser = 'private_chrome'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.