ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

[Solved] import rviz results to librviz_sip module not found

asked 2020-07-20 04:50:04 -0500

vuvuzella gravatar image

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 catkin_make_isolated. I have also sourced the setup.bash.

Problem: When trying to import rviz in python3, I get ImportError: No module named librviz_sip. however in my lib/python3/dist-packages/rviz path, librviz_sip.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?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-07-20 04:49:36 -0500

vuvuzella gravatar image

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

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-07-19 03:00:45 -0500

Seen: 399 times

Last updated: Jul 20 '20