将Ubuntu 14.04升级到16.04后无法导入python naoqi库

时间:2016-10-06 05:04:40

标签: python python-2.7 gnome ubuntu-16.04 nao-robot

我最近将系统升级到16.04 Gnome。我面临的最麻烦的事情是我不能为我的工作导入NAOqi库。这个库的python版本设置起来非常简单。只需要解压缩文件,然后输入一个名为PYTHONPATH的路径变量,指向该库,它就像14.04中的一个魅力一样。现在升级后我面临:

ng-style="{'background-color': '#'+site.Color}"

如果我添加路径变量:

Python 2.7.12 (default, Jul 1 2016, 15:12:24) [GCC 5.4.0 20160609] on linux2 Type "help", "copyright", "credits" or "license" for more information. import naoqi Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/dell/nao_sdk/pynaoqi/naoqi.py", line 7, in <module> import qi File "/home/dell/nao_sdk/pynaoqi/qi/__init__.py", line 72, in <module> from _qi import Application as _Application ImportError: libqipython.so: cannot open shared object file: No such file or directory 错误更改为:

export LD_LIBRARY_PATH=:/home/dell/nao_sdk/pynaoqi/

请帮助我如何才能让它正常工作?我也使用了python 2.6.9但是同样的错误发生在下面的错误中。

Python 2.7.12 (default, Jul 1 2016, 15:12:24) [GCC 5.4.0 20160609] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import naoqi Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/dell/nao_sdk/pynaoqi/naoqi.py", line 7, in <module> import qi File "/home/dell/nao_sdk/pynaoqi/qi/__init__.py", line 72, in <module> from _qi import Application as _Application ImportError: libboost_regex.so.1.55.0: cannot open shared object file: No such file or directory

1 个答案:

答案 0 :(得分:0)

安装libboost1.55就可以了。 16.04附带了libboost1.58,但是naoqi还没有兼容它。手动安装libboost1.55解决了导入错误。