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

cmake failed catkin_pkg

asked 2014-02-05 03:47:30 -0600

mr_d gravatar image

updated 2022-01-22 16:16:26 -0600

Evgeny gravatar image


I'm going through the ROS tutorials and am stuck at creating a workspace (

When I try and run catkin_make, I keep getting the following

ImportError: "from catkin_pkg.package import parse_package" failed: No module named catkin_pkg.package
Make sure that you have installed "catkin_pkg", it is up to date and on the PYTHONPATH.
CMake Error at /opt/ros/hydro/share/catkin/cmake/safe_execute_process.cmake:11 (message):
  returned error code 1
Call Stack (most recent call first):
/opt/ros/hydro/share/catkin/cmake/catkin_package_xml.cmake:63 (safe_execute_process)
/opt/ros/hydro/share/catkin/cmake/all.cmake:142 (_catkin_package_xml)
/opt/ros/hydro/share/catkin/cmake/catkinConfig.cmake:20 (include)
CMakeLists.txt:52 (find_package)

-- Configuring incomplete, errors occurred!
Invoking "cmake" failed

However, catkin_pkg is installed AND on my PYTHON PATH


Also, EXTREMELY SORRY that I fail at pasting dialog from the terminal on here.

edit retag flag offensive close merge delete

4 Answers

Sort by ยป oldest newest most voted

answered 2014-02-05 04:42:59 -0600

mr_d gravatar image

resolved using

pip install catkin_pkg

I'm using EPD, and the package was installed on a different Python

edit flag offensive delete link more



You should only install packages from PIP when you are on a platform which does not use Debian packages. Otherwise install the package "python-catkin-pkg".

Dirk Thomas gravatar image Dirk Thomas  ( 2014-02-05 05:56:49 -0600 )edit

It works for me:)

rong gravatar image rong  ( 2015-08-20 14:24:27 -0600 )edit

thank you. It worked

girayuzun gravatar image girayuzun  ( 2017-03-08 04:25:11 -0600 )edit

Thanks, it works for me

Moore gravatar image Moore  ( 2017-03-20 11:15:40 -0600 )edit

this does not solve the issue, catkin_pkg is already installed with pip in my case and i still get the above error.

alexe gravatar image alexe  ( 2017-04-17 16:35:55 -0600 )edit

Have you installed anaconda? If yes, maybe you should commet the anaconda path in .bashrc

Moore gravatar image Moore  ( 2017-04-18 03:37:47 -0600 )edit

Solved my issue as well.

MadeMyMark gravatar image MadeMyMark  ( 2020-11-25 15:27:16 -0600 )edit

answered 2018-03-09 16:03:40 -0600

waschbaer00 gravatar image

pip3 install catkin_pkg works for me.

edit flag offensive delete link more

answered 2019-04-15 06:30:28 -0600

starcosmos gravatar image

Hi,I meet the same question.And unfortunately pip and pip3 command couldn't help me.

So I back to the root folder by :cd /

And search my catkin_kpg by :find . -name catkin_kpg

Find my catkin_kpg in /usr/lib/python2.7/dist-packages

While I check my PYTHONPATH by:echo $PYTHONPATH and find there is only one adr: /opt/ros/indigo/lib/python2.7/dist-packages

That folder have no catkin_kpg So I add the adr:/usr/lib/python2.7/dist-packages into my .bashrc after that I catkin_make success.

I gess mr_d's PYTHONPATH:/usr/share/pyshared/catkin_pkg is need to be /usr/share/pyshared/ or somewhere else.

Hope it can help someone.

edit flag offensive delete link more


i could not get how you added the adr into bashrc p.s i am new to ros

akash12124234 gravatar image akash12124234  ( 2021-06-15 05:04:27 -0600 )edit

answered 2015-08-20 14:15:24 -0600

rong gravatar image

It works for me!

edit flag offensive delete link more


what works for you?

alexe gravatar image alexe  ( 2017-04-17 16:34:54 -0600 )edit

Why is this answer accepted? LOL

lorepieri gravatar image lorepieri  ( 2021-04-10 14:58:48 -0600 )edit

Question Tools

1 follower


Asked: 2014-02-05 03:47:30 -0600

Seen: 29,320 times

Last updated: Apr 11 '21