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

No Module Named catkin.builder

asked 2020-03-29 05:29:35 -0500

almacitunaberk gravatar image

updated 2022-05-01 13:09:13 -0500

lucasw gravatar image

I created a package inside catkin_ws/src folder using catkin_create_pkg command.

After writing publisher and subscriber nodes, I returned to catkin_ws and run catkin_make. However, I got this error:

            File "/opt/ros/melodic/bin/catkin_make", line 13, in <module>
               from catkin.builder import apply_platform_specific_defaults  # noqa: E402
               ImportError: No module named catkin.builder

I checked the folder catkin_make and line 13:

          from catkin.builder import apply_platform_specific_defaults  # noqa: E402
edit retag flag offensive close merge delete

Comments

I have the some issue, did you find any solution?

Toneee gravatar image Toneee  ( 2020-07-11 21:17:07 -0500 )edit

I have this issue too. Any news??

Alexis47 gravatar image Alexis47  ( 2020-09-25 21:42:43 -0500 )edit

3 Answers

Sort by ยป oldest newest most voted
0

answered 2021-10-05 03:20:47 -0500

TK5000 gravatar image

updated 2022-05-01 13:09:35 -0500

lucasw gravatar image

What fixed the Issue for me was to do:

source /opt/ros/$ROS_DISTRO/setup.bash

before catkin_make

edit flag offensive delete link more
0

answered 2023-08-02 15:09:47 -0500

Nagarjun gravatar image

The above happens when you unset a path . Ex:

unset PYTHONPATH

You need to add a path according to your version: This fixes it.

export PYTHONPATH=$PYTHONPATH:/opt/ros/melodic/lib/python2.7/dist-packages
edit flag offensive delete link more
0

answered 2020-10-12 04:44:53 -0500

boand gravatar image

I had the same issue. The first catkin_make command in a clean catkin workspace must be:

$ catkin_make -DPYTHON_EXECUTABLE=/usr/bin/python3

More details: http://wiki.ros.org/catkin/Tutorials/...

edit flag offensive delete link more

Comments

Only if you are using ROS Melodic (or any other non-Python 3 version of ROS) and are trying to force Catkin to use Python 3.

gvdhoorn gravatar image gvdhoorn  ( 2021-10-05 03:50:16 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2020-03-29 05:29:35 -0500

Seen: 3,233 times

Last updated: Aug 02 '23