简体   繁体   English

无法在浏览器上打开 jupyter(ipython) notebook

[英]unable to open jupyter(ipython) notebook on browser

I'm using python3.5 and jupyter 4.0.6 .我正在使用python3.5jupyter 4.0.6 I launched the jupyter notebook , and get the following output:我启动了jupyter notebook ,并得到以下输出:

[I 21:47:27.021 NotebookApp] Serving notebooks from local directory: /home/nitrous
[I 21:47:27.021 NotebookApp] 0 active kernels
[I 21:47:27.021 NotebookApp] The Jupyter Notebook is running at: http://localhost:8888/
[I 21:47:27.022 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[W 21:47:27.023 NotebookApp] No web browser found: could not locate runnable browser.

on my firefox browser, I typed the specified localhost url: http://localhost:8888/ but I get unable to connect error message.在我的firefox浏览器上,我输入了指定的 localhost url: http://localhost:8888/但我unable to connect错误消息。 What am I missing?我错过了什么? is the hint of the problem on this line:是这一行问题的暗示:

[W 21:47:27.023 NotebookApp] No web browser found: could not locate runnable browser.

it is my first time using the notebook.这是我第一次使用笔记本。 I tried to put the below code in the jupyter_notebook_config.py file but to no avail:我尝试将以下代码放在jupyter_notebook_config.py文件中,但无济于事:

c.NotebookApp.open_browser = True
c.NotebookApp.browser = 'firefox'

it also says 0 active kernels .它还说0 active kernels is that a problem?那是问题吗?

While running Jupyter on my ec2 instance I had faced the same issue.在我的 ec2 实例上运行 Jupyter 时,我遇到了同样的问题。 I resolved it by executing the following command :我通过执行以下命令解决了它:

jupyter notebook --no-browser jupyter 笔记本 --no-browser

Initially it will show 0 active kernels, once we start creating notebooks on different environments like Python,R etc it will show us the number of active kernels.最初它会显示 0 个活动内核,一旦我们开始在不同的环境(如 Python、R 等)上创建笔记本,它就会向我们显示活动内核的数量。

If you are running your jupyter notebook in a VM (mostly on a linux vm on a windows guest) and trying to access from guest, you will need to launch Jupyter Notebook with right options.如果您在 VM 中运行您的 jupyter Notebook(主要在 Windows 来宾上的 linux vm 上)并尝试从来宾访问,则需要使用正确的选项启动 Jupyter Notebook。 Please try to run it like below and it should work.请尝试像下面一样运行它,它应该可以工作。

jupyter notebook --ip=0.0.0.0 --no-browser

Please check the ip of the VM before you enter the URL in firefox.在firefox中输入URL之前,请检查VM的IP。 you can use您可以使用

ifconfig

command for this.为此命令。

I had a similar problem but with Chrome.我有一个类似的问题,但使用 Chrome。 I dont know in firefox but in chrome, Settings-> Enable guest browsing.我不知道在 Firefox 中,但在 chrome 中,设置-> 启用访客浏览。

I have a similar problem at first.我一开始也有类似的问题。 I solve it by changing the following line in jupyter_notebook_config.py :我通过更改jupyter_notebook_config.py的以下行来解决它:

c.NotebookApp.browser = r"C:/Program Files (x86)/Google/Chrome/Application/chrome.exe --app=%s"

I guess adding prefix "r" prefix to convert the string to raw string has actually solved this problem.我想添加前缀“r”前缀将字符串转换为原始字符串实际上已经解决了这个问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM