本文介绍了在Pepper上安装东西的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于不知道它使用什么软件包管理器,我该如何在Pepper上安装它们.我通常在Ubuntu计算机上使用apt,并希望在Pepper上安装一些软件包.我不确定Pepper拥有什么软件包管理器(如果有的话),是否要安装某些软件包,但是还只能使用apt知道软件包的名称(不确定其他软件包管理器中的软件包名称是否相同).如果可能,我是否可以在Pepper上安装apt.谢谢.

How would I install things on Pepper, since I don't know what package manager it uses. I usually use apt on my Ubuntu machine and want to install some packages on Pepper. I'm not sure what package manager Pepper has (if any) and want to install some packages, but also only know the name of the package using apt (not sure if the package name is the same on other package managers). And if possible, would I be able to install apt on Pepper. Thanks.

注意:根据我所做的研究,Pepper使用的是NaoQi,它基于使用portage的Gentoo.

Note: From the research I've done, Pepper is using NaoQi which is based off Gentoo which uses portage.

推荐答案

您没有Pepper的root访问权限,这限制了您可以安装的权限(并且apt始终不在机器人上).

You don't have root access on Pepper, which limits what you can install (and apt isn't on the robot anyway).

一些可能性:

  • 将内容包括在Choregraphe项目中-安装软件包时,将安装整个目录结构(更确切地说,.pml中列出的内容);因此您可以在机器人上放置任意文件,并且通常可以包含代码需要的任何依赖项.
  • 使用pip安装python软件包.

在NAOqi 2.5中,安装了一个稍旧的pip版本,该版本不一定总是开箱即用.我建议对其进行升级:

In NAOqi 2.5, a slightly older version of pip is installed that will not always work out of the box; I recommend upgrading it:

pip install --user --upgrade pip

...然后,您可以使用升级的pip使用升级的pip来安装其他软件包,并且始终--user:

... you can then use the upgraded pip to install other packages, using the upgraded pip, and always --user:

/home/nao/.local/bin/pip install --user whatever-package-you-need

但是请注意,如果您这样做并在运行于Pepper上的代码中使用程序包,则在您对其他机器人进行操作之前,该代码将无法在其他机器人上运行,这就是为什么我通常只在测试时这样做;对于生产代码,我更喜欢将所有依赖项打包在应用程序的程序包中.

Note however that if you do this and use your packages in your code running on Pepper, that code won't work on other robots until you do pip on them, which is why I usually only do this for tests; for production code I prefer packaging all dependencies in my app's package.

这篇关于在Pepper上安装东西的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-28 17:30