failed: No module named 'catkin_pkg' Make sure that you have installed "catkin_pkg"

https://stackoverflow.com/questions/43024337/why-this-error-when-i-try-to-create-workspaces-in-ros#

Are you using Anaconda environment? This issue is quite common with Anaconda's Python installation.

Try: python --version

If you see Anaconda in the output, go to your bashrc file with vi ~/.bashrc and then comment the line where anaconda is added to path. It would be something like,

export PATH="username/anaconda2/bin:$PATH"

After that source your bashrc with source ~/.bashrc, open a new terminal and navigate to your catkin workspace. Delete the old build folder and try the catkin_make command again.

Should solve your issue.

原文地址:https://www.cnblogs.com/lion-zheng/p/9398168.html