【问题标题】:Landing page not displayed in browser登陆页面未显示在浏览器中
【发布时间】:2015-02-08 03:48:41
【问题描述】:

每次我在终端运行ipthon notebook 时,Chrome 中都会弹出一个空白页面,而不是正常的仪表板页面。

相关信息

系统:Mac OS X Yosemite
终端中的 ipython 工作正常
所有python人员均由Anaconda包安装

$ python -c "import IPython; print(IPython.sys_info())"
{'commit_hash': '1c0eb68',
 'commit_source': '安装',
 'default_encoding': 'UTF-8',
 'ipython_path': '/Users/philip/anaconda/lib/python2.7/site-packages/IPython',
 'ipython_version': '2.3.1',
 'os_name': 'posix',
 '平台': '达尔文-14.1.0-x86_64-i386-64bit',
 'sys_executable': '/Users/philip/anaconda/bin/python',
 'sys_platform': '达尔文',
 'sys_version': '2.7.9 |Anaconda 2.1.0 (x86_64)| (默认,2014 年 12 月 15 日,10:37:34)\n[GCC 4.2.1(Apple Inc. build 5577)]'}

在终端使用调试标志启动服务器

$ ipython notebook --debug
2015-02-08 11:37:37.661 [NotebookApp] Config changed:
2015-02-08 11:37:37.661 [NotebookApp] {'Application': {'log_level': 10}}
2015-02-08 11:37:37.661 [NotebookApp] IPYTHONDIR set to: /Users/philip/.ipython
2015-02-08 11:37:37.662 [NotebookApp] Using existing profile dir: u'/Users/philip/.ipython/profile_default'
2015-02-08 11:37:37.662 [NotebookApp] Searching path [u'/Users/philip/Downloads/quant/backtesting', u'/Users/philip/.ipython/profile_default'] for config files
2015-02-08 11:37:37.662 [NotebookApp] Attempting to load config file: ipython_config.py
2015-02-08 11:37:37.664 [NotebookApp] Loaded config file: /Users/philip/.ipython/profile_default/ipython_config.py
2015-02-08 11:37:37.664 [NotebookApp] Attempting to load config file: ipython_notebook_config.py
2015-02-08 11:37:37.665 [NotebookApp] Loaded config file: /Users/philip/.ipython/profile_default/ipython_notebook_config.py
2015-02-08 11:37:37.668 [NotebookApp] Adding cluster profile 'default'
2015-02-08 11:37:37.668 [NotebookApp] searching for local mathjax in [u'/Users/philip/.ipython/nbextensions']
2015-02-08 11:37:37.668 [NotebookApp] Serving local MathJax from /Users/philip/.ipython/nbextensions/mathjax/MathJax.js at /nbextensions/mathjax/MathJax.js
2015-02-08 11:37:37.742 [NotebookApp] Serving notebooks from local directory: /Users/philip/Downloads/quant/backtesting
2015-02-08 11:37:37.742 [NotebookApp] 0 active kernels
2015-02-08 11:37:37.742 [NotebookApp] The IPython Notebook is running at: http://localhost:8888/
2015-02-08 11:37:37.742 [NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).

到目前为止我尝试过的补救措施

删除整个 anaconda 包。请改用 brew 版本的 python 解释器。 pip install ipython[all]。之后,我仍然得到一个空白页。

这让我想知道它与 OS X 系统有关,而不是真正的 python/ipython/notebook/anaconda 问题。也许某些系统库丢失或没有符号链接等。问题是如何调试?

更新

通过 conda 更新 ipython 后,我仍然有空白的登陆页面

【问题讨论】:

    标签: ipython ipython-notebook anaconda


    【解决方案1】:

    经过 10 多个小时的迭代调试,我解决了这个问题。归根结底,它只是主机文件中缺少的一行“127.0.0.1 localhost”。因此,Chrome 无法解析 localhost。我不知道那条线是如何被删除的或何时被删除的。不过谢天谢地,一切都结束了。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-11-05
      • 2014-11-13
      • 1970-01-01
      • 1970-01-01
      • 2016-04-11
      • 2020-08-02
      • 2023-03-04
      相关资源
      最近更新 更多