无法在HDInsight 4.0中创建Jupyter Notebook

问题描述 投票:1回答:2

我正在使用Azure HDInsight 4.0(Spark 2.4)。当我尝试创建新的Jupyter笔记本(Spark,但PySpark笔记本出现类似错误)时,出现以下错误消息:

Traceback (most recent call last): File "/usr/bin/anaconda/lib/python2.7/site-packages/notebook/base/handlers.py", line 457, in wrapper result = yield gen.maybe_future(method(self, *args, **kwargs)) File "/usr/bin/anaconda/lib/python2.7/site-packages/tornado/gen.py", line 1015, in run value = future.result() File "/usr/bin/anaconda/lib/python2.7/site-packages/tornado/concurrent.py", line 237, in result raise_exc_info(self._exc_info) File "/usr/bin/anaconda/lib/python2.7/site-packages/tornado/gen.py", line 1021, in run yielded = self.gen.throw(*exc_info) File "/usr/bin/anaconda/lib/python2.7/site-packages/notebook/services/contents/handlers.py", line 216, in post yield self._new_untitled(path, type=type, ext=ext) File "/usr/bin/anaconda/lib/python2.7/site-packages/tornado/gen.py", line 1015, in run value = future.result() File "/usr/bin/anaconda/lib/python2.7/site-packages/tornado/concurrent.py", line 237, in result raise_exc_info(self._exc_info) File "/usr/bin/anaconda/lib/python2.7/site-packages/tornado/gen.py", line 285, in wrapper yielded = next(result) File "/usr/bin/anaconda/lib/python2.7/site-packages/notebook/services/contents/handlers.py", line 171, in _new_untitled model = yield gen.maybe_future(self.contents_manager.new_untitled(path=path, type=type, ext=ext)) File "/usr/bin/anaconda/lib/python2.7/site-packages/notebook/services/contents/manager.py", line 338, in new_untitled return self.new(model, path) File "/usr/bin/anaconda/lib/python2.7/site-packages/notebook/services/contents/manager.py", line 364, in new model = self.save(model, path) File "/var/lib/.jupyter/jupyterazure/jupyterazure/httpfscontentsmanager.py", line 84, in save self.create_checkpoint(path) File "/usr/bin/anaconda/lib/python2.7/site-packages/notebook/services/contents/manager.py", line 459, in create_checkpoint return self.checkpoints.create_checkpoint(self, path) File "/usr/bin/anaconda/lib/python2.7/site-packages/notebook/services/contents/checkpoints.py", line 79, in create_checkpoint model = contents_mgr.get(path, content=True) File "/var/lib/.jupyter/jupyterazure/jupyterazure/httpfscontentsmanager.py", line 56, in get 'metadata': {}}) File "/var/lib/.jupyter/jupyterazure/jupyterazure/model.py", line 45, in create_model_from_blob nbformat.version_info[0]) File "/usr/bin/anaconda/lib/python2.7/site-packages/nbformat/__init__.py", line 75, in reads nb = convert(nb, as_version) File "/usr/bin/anaconda/lib/python2.7/site-packages/nbformat/converter.py", line 54, in convert "version doesn't exist" % (to_version)) ValueError: Cannot convert notebook to v5 because that version doesn't exist

此后,主屏幕上会出现一个新的笔记本does,但是如果我尝试打开它,则会收到以下弹出消息:

An unknown error occurred while loading this notebook. This version can load notebook formats v4 or earlier. See the server log for details.

我可以在其他相同的HDI 3.6群集上创建笔记本,但在4.0上则不能。 (我需要4.0,因为我需要使用Spark 2.4。)

以前有没有人经历过/解决过这个问题?

apache-spark jupyter-notebook hdinsight
2个回答
1
投票

最近,我们在同一问题上看到了几个问题。您可以按照以下步骤解决问题。

解决此问题的步骤:

[Step1:通过ssh连接到头节点并更改文件的内容-/usr/bin/anaconda/lib/python2.7/site-packages/nbformat/_version.py,将5替换为4

enter image description here

将其更改为:

version_info =(4,0,3)

enter image description here

[Step2:通过Ambari重新启动Jupyter服务。

enter image description here

有关更多详细信息,请参见HDInshight Create not create Jupyter notebook

希望这会有所帮助。如果您还有其他疑问,请告诉我们。


0
投票

您能告诉我如何通过ssh与headnode连接并按照您提到的那样更改文件的内容...。我被封锁这么久了。谢谢您的帮助@cheektlapradeep

© www.soinside.com 2019 - 2024. All rights reserved.