Ask Your Question

import tf error

asked 2021-10-27 00:57:08 -0500

MPR gravatar image

updated 2021-10-27 07:24:07 -0500

lucasw gravatar image

how to solve the issue?

import tf
  File "/opt/ros/melodic/lib/python2.7/dist-packages/tf/", line 30, in <module>
    from tf2_ros import TransformException as Exception, ConnectivityException, LookupException, ExtrapolationException
  File "/home/aimotion/catkin_ws/devel/lib/python3/dist-packages/tf2_ros/", line 34, in <module>
  File "<string>", line 38, in <module>
  File "/home/aimotion/catkin_ws/devel/lib/python3/dist-packages/tf2_py/", line 34, in <module>
  File "<string>", line 38, in <module>
ImportError: dynamic module does not define module export function (PyInit__tf2)
edit retag flag offensive close merge delete


This is a repeat question, pls refer to:

osilva gravatar image osilva  ( 2021-10-27 04:54:15 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2021-10-27 07:02:21 -0500

Mike Scheutzow gravatar image

updated 2021-10-27 07:07:30 -0500

With melodic you are expected to use python2. Before you build again, make sure you delete the top-level devel and build directories in your catkin_ws.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2021-10-27 00:57:08 -0500

Seen: 282 times

Last updated: Oct 27 '21