aldebaran/libqi

Cannot import python naoqi library after upgrading Ubuntu 14.04 to 16.04

Closed this issue ยท 11 comments

I have recently upgraded the system to 16.04 Gnome. The most troubling thing that I am facing is that I cannot import a NAOqi library for my work. The python version of this library was pretty simple to set-up. One just has to untar the file and then enter a path variable called PYTHONPATH pointing to this library and it worked like a charm in 14.04. Now since upgrade I am facing:

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

If I add a path variable:
export LD_LIBRARY_PATH=:/home/dell/nao_sdk/pynaoqi/
The error changes to:

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

Please help me what should I do to get it working? I have also used python 2.6.9 but same error occurs with error below.

ImportError: libboost_python.so.1.55.0: cannot open shared object file: No such file or directory

Hi, we don't have the support for ubuntu 16.04 yet. We will work on it soon. It seems that you are using nao sdk. This one is using boost 1.55 and ubuntu 16.04 probably have newer version of boost.

You should try to install boost 1.55 an see if this is working.

@hcuche Do you suggest downgrading the system to 14.04 in order to avoid any inconvenience other than boost?

@husnain-ahmad Not really, I'm suggestion installing boost 1.55. It might fix your problems with boost. After that I cannot assure you that everything else will works fine since we didn't yet tried to support 16.04.

Some of use succeed to do so but there is lots of warning and fixes need to make it well supported on 16.04.

@hcuche installing libboost1.55 did the trick. Thank you so much for your very kind support.

Hi,

I'm coding in python and I got the same error then i tried to install libboost1.55 from here.
but how can i set Libboost1.55 as the default version in my project!

in #22 someone suggested this toolchain but there is no explanation about how to use it! I mean where I have to add this piece of code! remember i'm coding in python and not c++!
Thanks in advance,

Hello elahia,

We need further information in order to help you. Which distribution/version are you using ? Are you compiling libqi and libqi-python ? If so which version are you compiling ? Are you using qibuild ?

@nyibbang

hey I just solved the problem 5 minutes ago! i just used pynaoqi2.5.5.5 instead of pynaqi 2.1.4.

to help others i'm using: ubuntu 16.04 (64bit), python 2.7.14 (64bit), boost 1.58 and 1.55, lunar, python naoqi 2.5.5

Thank you so much for your reply.

Glad you solved your problem !

Using an older version of python naoqi (e.g. Python 2.7 SDK 2.1.2) solves this problem on Ubuntu 18

Using an older version of python naoqi (e.g. Python 2.7 SDK 2.1.2) solves this problem on Ubuntu 18

Was probably assumed but I can confirm that this solution also works for 16.04

Can anyone help with detailed installation process of NAOqi SDK (python) on Ubuntu. The installation process on the official page is not detailed enough for beginners.