【发布时间】:2016-01-28 15:44:34
【问题描述】:
首先,导航键(箭头、home、end...)在我的 ipython 笔记本(Ubuntu 14.04,firefox 和 chromium 中)中停止工作,然后我按照 安装 Jupyter(我已经在http://jupyter.readthedocs.org/en/latest/install.html 中拥有 Python) 期望升级可以解决问题,但是现在当我尝试创建一个新的 Python2 笔记本时,我的浏览器中出现了一个空白屏幕,当我尝试加载旧笔记本。我在命令行中看不到任何错误。之后,我安装了 anaconda (Python3),希望由于它是自包含的,它可以解决问题,但事实并非如此。关于什么可能导致这种行为的任何想法?
编辑:
Web 控制台显示多个错误和警告。在笔记本主页中显示:
Using //@ to indicate sourceMappingURL pragmas is deprecated. Use //# instead main.min.js:1:0
accessing `Notebook` is deprecated. Use `require("notebook/js/notebook").Notebook` main.min.js:28:11
Error: Module name "notebook/js/notebook" has not been loaded yet for context: _. Use require([])
http://requirejs.org/docs/errors.html#notloaded require.js:165:17
Use of getPreventDefault() is deprecated. Use defaultPrevented instead. main.min.js:5:12747
Reenabling autorefresh too close to last tree refresh, not refreshing immediately again. main.min.js:15253:13
Reenabling autorefresh too close to last tree refresh, not refreshing immediately again. main.min.js:15253:13
但是,笔记本主页按预期工作。新的 Python 3 笔记本还显示 JS 警告和错误:
Using //@ to indicate sourceMappingURL pragmas is deprecated. Use //# instead main.min.js:86:0
accessing `Notebook` is deprecated. Use `require("notebook/js/notebook").Notebook` main.min.js:21:11
accessing `RawCell` is deprecated. Use `require("notebook/js/textcell").RawCell` main.min.js:21:11
accessing `Cell` is deprecated. Use `require("notebook/js/cell").Cell` main.min.js:21:11
accessing `TextCell` is deprecated. Use `require("notebook/js/textcell").TextCell` main.min.js:21:11
accessing `MarkdownCell` is deprecated. Use `require("notebook/js/textcell").MarkdownCell` main.min.js:21:11
TypeError: IPython.HeadingCell is undefined custom.js:8:5
Use of getPreventDefault() is deprecated. Use defaultPrevented instead. main.min.js:90:12747
Loaded extension: widgets/notebook/js/extension main.min.js:12030:17
TypeError: IPython.notebook is undefined
暂时
/usr/bin/ipython3 notebook
和开始一样工作,即,我可以正常执行所有操作,但箭头键和 home、end、pgUp、pgDown、插入和删除都不起作用。
提前致谢。
【问题讨论】:
-
可能是浏览器缓存。多次按 Ctrl-F5 强制清除缓存并刷新。
-
@Thomas K 感谢您的建议,但多次按 Ctrl-F5 并没有解决问题
-
浏览器的JS控制台有错误吗?
-
@ThomasK JS 控制台有几个错误(见编辑)。他们似乎是我的问题的原因。你能指出如何解决它们吗?
-
我仍然怀疑浏览器缓存。你能用
--port=8889(或任何不是它通常运行的端口的数字)运行笔记本吗?那应该避免它在缓存中的内容。
标签: python ipython anaconda jupyter