首先我用的是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]
在这里我们可以看到我被卡在了Do you want to continue [Y/n].
我尝试的第一件事是作为root用户运行jupyter notbook,这在我到达这部分之前有一点帮助。
我尝试的第二件事是添加"y"下面的代码片段在jupyter笔记本中希望它能继续下载文件。
我做了一些研究后发现它缺少了一些东西。
如果有人卡在这里,请更改您的代码像这样:
!是| apt-get installprotobuf-compiler