卡在你想继续使用 jupyter 笔记本吗

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

首先我使用Linux操作系统。

问题是我陷入了“你想继续[Y/n]”吗?这将不允许我下载剩余的文件,因为我无法弄清楚如何插入“y”来继续下载文件。

这是我认为问题所在的代码片段:

if os.name=='posix':  
!apt-get install protobuf-compiler
!cd Tensorflow/models/research && protoc object_detection/protos/*.proto --python_out=. && cp object_detection/packages/tf2/setup.py . && python -m pip install . 

出现的输出是这样的:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following package was automatically installed and is no longer required:
systemd-hwe-hwdb
Use 'apt autoremove' to remove it.
The following additional packages will be installed:
libprotobuf-dev libprotobuf-lite23 libprotoc23
Suggested packages:
protobuf-mode-el
The following NEW packages will be installed:
libprotobuf-dev libprotobuf-lite23 libprotoc23 protobuf-compiler
0 upgraded, 4 newly installed, 0 to remove and 96 not upgraded.
Need to get 2,246 kB of archives.
After this operation, 14.6 MB of additional disk space will be used.
Do you want to continue? [Y/n] 

在这里我们可以看到我陷入了“你想继续吗”[Y/n]。

我尝试的第一件事是以 root 用户身份运行 jupyter notbook,这对我到达这部分有所帮助。

我尝试的第二件事是在 jupyter Notebook 中的代码片段下方添加一个“y”,希望它能够继续下载文件。

tensorflow ubuntu jupyter-notebook download
2个回答
2
投票

经过一番研究,我发现它缺少了一些东西。

如果有人被困在这里,请将您的代码更改为如下所示:

!是的 | apt-get 安装 Protobuf 编译器


0
投票

您只需添加

--quiet
标志即可接受默认答案

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