Install things on Pepper

断了今生、忘了曾经 提交于 2019-11-28 00:33:02

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

Some possibilities:

  • Include your content in Choregraphe projects - when you install a package, the whole directory structure is installed (more exactly, what's listed in the .pml); so you can put arbitrary files on your robot, and you can usually include whatever dependencies your code needs.
  • Install python packages with 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

... 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

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.

The package manager on pepper is disabled. But you can copy the files to the robot and write your own service that imports any package you might need.

As a supplement on importing: http://www.about-robots.com/how-to-import-python-files-in-your-pepper-apps.html

DoubleD78

To get rid of error :

" SSL3_GET_SERVER_CERTIFICATE:certificate verify failed ".

If you use python and requests package, just add verify=False at the end of your parameters.

r=requests.get(URL,params,header,verify=False)

Works with my Pepper

To get rid of

InsecurePlatformWarning: A true SSLContext object is not available.

install

/home/nao/.local/bin/pip install --user requests[security]

To get rid of:

CryptographyDeprecationWarning: Support for your Python version is deprecated.

install

/home/nao/.local/bin/pip install --user cryptography==2.2.2
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!