dqrobotics / python

The DQ Robotics library in Python
https://dqrobotics.github.io
GNU Lesser General Public License v3.0
24 stars 9 forks source link

Import error in Python 3 #1

Closed juanjqo closed 5 years ago

juanjqo commented 5 years ago

Hi @mmmarinho, I was using the DQ library for Python 2. Now, I'm migrating to Python 3, since python2 will not be supported anymore. I installed the library ( python3 -m pip install dqrobotics ). But I have an import error. (I'm using Ubuntu 18.04)

In a new terminal:

juanjqo@pop-os:~$ python3

Python 3.6.7 (default, Oct 22 2018, 11:32:17) [GCC 8.2.0] on linux Type "help", "copyright", "credits" or "license" for more information.

from dqrobotics import*

Traceback (most recent call last): File "", line 1, in ImportError: /home/juanjqo/.local/lib/python3.6/site-packages/dqrobotics.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZN11DQ_robotics31line_to_point_distance_jacobianERKN5Eigen6MatrixIdLin1ELin1ELi0ELin1ELin1EEERKNS2DQES7

Can you help me?

Best regards,

Juancho

mmmarinho commented 5 years ago

Hello, @juanjqo!

There is nothing wrong at your end, it was a mistake I made in the C++ implementation.

I pushed a fix just now and I can import the package without issues in my 18.04. Just update the package and you should be ready to go

python3 -m pip install dqrobotics --upgrade

PS: To avoid these problems in the future I updated the continuous integration service to try importing the library before uploading to PyPi in commit https://github.com/dqrobotics/python/commit/a7a2d19550408fb358e778d7b44d4342f13f83f4

juanjqo commented 5 years ago

Thanks @mmmarinho It is working!