无法在 Azure HDInsight 中创建 Jupyter 笔记本Unable to create Jupyter notebook in Azure HDInsight

本文介绍在与 Azure HDInsight 群集交互时出现的问题的故障排除步骤和可能的解决方案。This article describes troubleshooting steps and possible resolutions for issues when interacting with Azure HDInsight clusters.

问题Issue

启动 Jupyter 笔记本时,会收到一条错误消息,其中包含:When starting a Jupyter notebook, you receive an error message that contains:

Cannot convert notebook to v5 because that version doesn't exist

原因Cause

版本不匹配。A version mismatch.

解决方法Resolution

  1. 使用 ssh 命令连接到群集。Use ssh command to connect to your cluster. 编辑以下命令(将 CLUSTERNAME 替换为群集的名称),然后输入该命令:Edit the command below by replacing CLUSTERNAME with the name of your cluster, and then enter the command:

    ssh sshuser@CLUSTERNAME-ssh.azurehdinsight.cn
    
  2. 通过执行以下命令打开 _version.pyOpen _version.py by executing the following command:

    sudo nano /usr/bin/anaconda/lib/python2.7/site-packages/nbformat/_version.py
    
  3. 5 更改为 4,使修改后的行如下所示:Change 5 to 4 so the modified line appears as follows:

    version_info = (4, 0, 3)
    

    通过输入 Ctrl + XYEnter 来保存更改。Save changes by entering Ctrl + X, Y, Enter.

  4. 在 Web 浏览器中,导航到 https://CLUSTERNAME.azurehdinsight.cn/#/main/services/JUPYTER,其中 CLUSTERNAME 是群集的名称。From a web browser, navigate to https://CLUSTERNAME.azurehdinsight.cn/#/main/services/JUPYTER, where CLUSTERNAME is the name of your cluster.

  5. 重启 Jupyter 服务。Restart the Jupyter service.

后续步骤Next steps

如果你的问题未在本文中列出,或者无法解决问题,请访问以下渠道以获取更多支持:If you didn't see your problem or are unable to solve your issue, visit the following channel for more support:

  • 如果需要更多帮助,可以从 Azure 门户提交支持请求。If you need more help, you can submit a support request from the Azure portal.