简体   繁体   English

无法在 jupyter notebook 中创建 Python 3 笔记本

[英]Can't create a Python 3 notebook in jupyter notebook

I'm following this tutorial and I'm stuck when I want to create a new Jupyter Notebook (Python 3).我正在关注本教程,当我想创建一个新的 Jupyter Notebook (Python 3) 时,我遇到了困难。 The cluster is created using this command:使用以下命令创建集群:

gcloud beta dataproc clusters create ${CLUSTER_NAME} \
 --region=${REGION} \
 --image-version=1.4 \
 --master-machine-type=n1-standard-4 \
 --worker-machine-type=n1-standard-4 \
 --bucket=${BUCKET_NAME} \
 --optional-components=ANACONDA,JUPYTER \
 --enable-component-gateway

When I accessing the JupyterLab and try to create a new notebook I can see:当我访问 JupyterLab 并尝试创建一个新笔记本时,我可以看到: 在此处输入图像描述 and then接着在此处输入图像描述

console works fine控制台工作正常

Thanks in advance!提前致谢!

This is a consequence of the new feature to support storing notebooks either in GCS or on the local disk.这是支持将笔记本存储在 GCS 或本地磁盘中的新功能的结果。

To enable that, the top-level directory inside of Jupyter (and JupyterLab) was made into a virtual, read-only directory that just links to the GCS and local disk locations via virtual subdirectories.为了实现这一点,Jupyter(和 JupyterLab)内部的顶级目录被制作成一个虚拟的只读目录,该目录仅通过虚拟子目录链接到 GCS 和本地磁盘位置。 The intention is that you choose a storage location by navigating this virtual file hierarchy.目的是您通过导航此虚拟文件层次结构来选择存储位置。

So, if you try to create a file at the top-level, you will get an error because that top-level is read-only, but if you navigate into one of the subdirectories, then things will work as expected.因此,如果您尝试在顶层创建文件,则会收到错误消息,因为该顶层是只读的,但如果您导航到其中一个子目录,那么一切都会按预期工作。

The user experience around this clearly needs to be improved, and that error message is not helpful at all, so we are working on improving the experience here.这方面的用户体验显然需要改进,而该错误消息根本没有帮助,因此我们正在努力改进这里的体验。

However, if you choose one of the two storage options (by navigating into one of the subdirectories), then things should work as expected.但是,如果您选择两个存储选项之一(通过导航到其中一个子目录),那么事情应该会按预期工作。

Please navigate to GCS or Local Disk on the left panel as an intermediate solution, it should work afterwards.请导航到左侧面板上的GCSLocal Disk作为中间解决方案,之后它应该可以工作。

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

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