# I am not able to use catkin build

**URL:** <https://get-help.theconstruct.ai/t/i-am-not-able-to-use-catkin-build/11785>\
**Category:** ROSDS Support\
**Tags:** catkin\_make\
**Created:** [August 10, 2021, 7:40am UTC](https://get-help.theconstruct.ai/t/i-am-not-able-to-use-catkin-build/11785 "2021-08-10T07:40:57Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aniket2](https://get-help.theconstruct.ai/letter_avatar_proxy/v4/letter/a/7c8e57/32.png) [@Aniket2](https://get-help.theconstruct.ai/u/Aniket2)\
**Post date:** [August 10, 2021, 7:40am UTC](https://get-help.theconstruct.ai/t/i-am-not-able-to-use-catkin-build/11785/1 "2021-08-10T07:40:57Z")

</div>

![Screenshot (62)](https://get-help.robotigniteacademy.com/uploads/default/original/2X/a/a8da490b001180597987c5bd37f1b03059e0fcef.png)

Part 1 of the final project of ROS Basics in 5 days (python) related to the topics chapter, I am not able to build my package in the rosject (copy) using catkin build or catkin make. the terminal shows the above message. Can anyone point out what I am doing wrong?  
Thank you.

---

<div class="post-metadata">

**Author:** ![marco.nc.arruda](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/marco.nc.arruda/32/2639_2.png) [@marco.nc.arruda](https://get-help.theconstruct.ai/u/marco.nc.arruda)\
**Post date:** [August 10, 2021, 2:03pm UTC](https://get-help.theconstruct.ai/t/i-am-not-able-to-use-catkin-build/11785/2 "2021-08-10T14:03:36Z")

</div>

Hi @Aniket2 ,

Sounds like the current shell doesn’t know ROS environment.  
Could you try sourcing ROS workspace and retry the build command?

It would be helpful if you print to me the output of `$ROS_PACKAGE_PATH`

Regards

---

<div class="post-metadata">

**Author:** ![Aniket2](https://get-help.theconstruct.ai/letter_avatar_proxy/v4/letter/a/7c8e57/32.png) [@Aniket2](https://get-help.theconstruct.ai/u/Aniket2)\
**Post date:** [August 11, 2021, 3:54am UTC](https://get-help.theconstruct.ai/t/i-am-not-able-to-use-catkin-build/11785/3 "2021-08-11T03:54:17Z")

</div>

@marco.nc.arruda, Thanks for the reply.  
Here is the output for $ROS\_PACKAGE\_PATH  
[_ **img\_link\_01** _](https://drive.google.com/file/d/1FdnGiCN8Wmjw4fB1qVBcpjrtIOkVBpXw/view?usp=sharing)  
I have tried “_ **source .catkin\_workspace build/** _” and found a couple of options as follows.  
[_ **img\_link\_02** _](https://drive.google.com/file/d/15c-CpT366OcGj2lUdQj0wq_7FZuCXV6G/view?usp=sharing)  
Do I do something with these?

---

<div class="post-metadata">

**Author:** ![marco.nc.arruda](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/marco.nc.arruda/32/2639_2.png) [@marco.nc.arruda](https://get-help.theconstruct.ai/u/marco.nc.arruda)\
**Post date:** [August 11, 2021, 2:08pm UTC](https://get-help.theconstruct.ai/t/i-am-not-able-to-use-catkin-build/11785/4 "2021-08-11T14:08:49Z")

</div>

@Aniket2 ,

You need to source the workspaces like below:

```auto
source ~/catkin_ws/devel/setup.bash

```

Though, you may have a workspace that was compiled using `catkin_make` before, so it mixes the workspace settings.  
The best to be done is to remove `build` and `devel` folder and re-compile using the tool your prefer.

After that, catkin commands must be available

Please, let me know if that works for you

---

<div class="post-metadata">

**Author:** ![Aniket2](https://get-help.theconstruct.ai/letter_avatar_proxy/v4/letter/a/7c8e57/32.png) [@Aniket2](https://get-help.theconstruct.ai/u/Aniket2)\
**Post date:** [August 11, 2021, 3:44pm UTC](https://get-help.theconstruct.ai/t/i-am-not-able-to-use-catkin-build/11785/5 "2021-08-11T15:44:08Z")

</div>

@marco.nc.arruda Thanks for the follow-up.

Ok so I did

```auto
rm -rf build/ devel/

```

```auto
catkin build

```

which does not seem to work. It’s giving a similar error like before.  
I repeated the above but with

```auto
catkin_make

```

This time It seems to work fine. I am still curious why `catkin build` is not working.

[link for `catkin build` error img](https://drive.google.com/file/d/1ieHY1zJ7hUCP0ojG9-ovpJG6H5X0-z-U/view?usp=sharing)

---

<div class="post-metadata">

**Author:** ![ralves](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/ralves/32/7039_2.png) [@ralves](https://get-help.theconstruct.ai/u/ralves)\
**Post date:** [August 12, 2021, 5:18pm UTC](https://get-help.theconstruct.ai/t/i-am-not-able-to-use-catkin-build/11785/6 "2021-08-12T17:18:49Z")

</div>

Hi @Aniket2

I confirmed that the error is happening when you open a **Noetic rosject**.

We are going to solve it, but in the meantime, you can run the following command to install the missing dependency before running `catkin build`:

```auto
pip3 install osrf-pycommon

```

Cheers.

---

<div class="post-metadata">

**Author:** ![Aniket2](https://get-help.theconstruct.ai/letter_avatar_proxy/v4/letter/a/7c8e57/32.png) [@Aniket2](https://get-help.theconstruct.ai/u/Aniket2)\
**Post date:** [August 13, 2021, 3:10am UTC](https://get-help.theconstruct.ai/t/i-am-not-able-to-use-catkin-build/11785/7 "2021-08-13T03:10:34Z")

</div>

@ralves Thanks for that, I have tried this and it works well.
