是否可以在 SageMaker Studio Lab 中 "apt install"?

Is it possible to "apt install" in SageMaker Studio Lab?

我已经开始使用 SageMaker Studio Lab。

当我在 SageMaker Studio Lab Notebook 中 运行“apt install xvfb”时,出现以下错误。

!apt install xvfb

E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?

然后我尝试使用sudo,但是没有安装sudo命令。

!sudo apt install xvfb

/usr/bin/sh: 1: sudo: not found

你能告诉我如何解决这个问题吗?

迄今为止,Studio Lab 不支持需要根访问权限的包安装。它确实支持可通过 pip 和 conda 安装的软件包。您可以在笔记本中使用 % 而不是 ! 来执行此操作,也可以通过打开终端来执行此操作。

如果您想打开一个问题,欢迎您在我们的存储库上这样做:

感谢您试用 Studio Lab!