Robotics StackExchange | Archived questions

[Solved] import rviz results to librviz_sip module not found

I tried to compile ROS kinetic for python3 support with all packages included in desktop-full. I changed all references of python2 to python3 as well as changed some python2 print to python3 print. Compilation log did not show any errors. Compiled ROS using catkinmakeisolated. I have also sourced the setup.bash.

Problem: When trying to import rviz in python3, I get ImportError: No module named librvizsip. however in my lib/python3/dist-packages/rviz path, librvizsip.so is clearly there. If I run python3 in that same folder where librviz_sip.so is located and imported rviz, the import is successful. So I might not be setting some environment variables correctly.

Has anyone encountered this error when compiling ros for python3 support?

Asked by vuvuzella on 2020-07-19 03:00:45 UTC

Comments

Answers

Apparently, the rviz version included in the kinetic release does not search for librviz_sip using relative directory. According to https://github.com/ros-visualization/rviz/pull/1454/commits/b02ff2e0d43b064250805e29dddd1ffc124e335a the changes in that commit fixes this.

I made these changes in my src/rviz/src/python_bindings/init.py, recompiled rviz, and rviz got imported correctly. I am encountering the same error in tf, so perhaps a similar fix can be done as well.

Asked by vuvuzella on 2020-07-20 04:49:36 UTC

Comments