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

How to resolve catkin_pkg error

asked 2018-12-28 09:13:33 -0600

geraldinejns gravatar image

updated 2018-12-28 09:16:40 -0600

gvdhoorn gravatar image

This is the error message I get after creating a ROS workspace:

jones@gee:~/catkin_ws$ catkin_make
Base path: /home/jones/catkin_ws
Source space: /home/jones/catkin_ws/src
Build space: /home/jones/catkin_ws/build
Devel space: /home/jones/catkin_ws/devel
Install space: /home/jones/catkin_ws/install
####
#### Running command: "cmake /home/jones/catkin_ws/src -DCATKIN_DEVEL_PREFIX=/home/jones/catkin_ws/devel -DCMAKE_INSTALL_PREFIX=/home/jones/catkin_ws/install -G Unix Makefiles" in "/home/jones/catkin_ws/build"
####
-- Using CATKIN_DEVEL_PREFIX: /home/jones/catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/kinetic
-- This workspace overlays: /opt/ros/kinetic
-- Using PYTHON_EXECUTABLE: /home/jones/miniconda3/bin/python
-- Using Debian Python package layout
-- Using empy: /usr/bin/empy
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/jones/catkin_ws/build/test_results
-- Found gmock sources under '/usr/src/gmock': gmock will be built
-- Found gtest sources under '/usr/src/gmock': gtests will be built
-- Using Python nosetests: /usr/bin/nosetests
ImportError: "from catkin_pkg.package import parse_package" failed: No module named 'catkin_pkg'
Make sure that you have installed "catkin_pkg", it is up to date and on the PYTHONPATH.
CMake Error at /opt/ros/kinetic/share/catkin/cmake/safe_execute_process.cmake:11 (message):
  execute_process(/home/jones/miniconda3/bin/python
  "/opt/ros/kinetic/share/catkin/cmake/parse_package_xml.py"
  "/opt/ros/kinetic/share/catkin/cmake/../package.xml"
  "/home/jones/catkin_ws/build/catkin/catkin_generated/version/package.cmake")
  returned error code 1
Call Stack (most recent call first):
  /opt/ros/kinetic/share/catkin/cmake/catkin_package_xml.cmake:74 (safe_execute_process)
  /opt/ros/kinetic/share/catkin/cmake/all.cmake:163 (_catkin_package_xml)
  /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:20 (include)
  CMakeLists.txt:52 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/jones/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/jones/catkin_ws/build/CMakeFiles/CMakeError.log".
Invoking "cmake" failed

when i type sudo dpkg -L python-catkin-pkg I got the following below:

jones@gee:~$ dpkg -L python-catkin-pkg
/.
/usr
/usr/lib
/usr/lib/python2.7
/usr/lib/python2.7/dist-packages
/usr/lib/python2.7/dist-packages/catkin_pkg-0.4.9.egg-info
/usr/lib/python2.7/dist-packages/catkin_pkg-0.4.9.egg-info/PKG-INFO
/usr/lib/python2.7/dist-packages/catkin_pkg-0.4.9.egg-info/entry_points.txt
/usr/lib/python2.7/dist-packages/catkin_pkg-0.4.9.egg-info/requires.txt
/usr/lib/python2.7/dist-packages/catkin_pkg-0.4.9.egg-info/dependency_links.txt
/usr/lib/python2.7/dist-packages/catkin_pkg-0.4.9.egg-info/top_level.txt
/usr/bin
/usr/bin/catkin_generate_changelog
/usr/bin/catkin_find_pkg
/usr/bin/catkin_package_version
/usr/bin/catkin_test_changelog
/usr/bin/catkin_tag_changelog
/usr/bin/catkin_create_pkg
/usr/bin/catkin_prepare_release
/usr/share
/usr/share/doc
/usr/share/doc/python-catkin-pkg
/usr/share/doc/python-catkin-pkg/changelog.Debian.gz
/usr/share/doc/python-catkin-pkg/copyright

when I typed ~/.bashrc i scrolled all the way to the bottom of the file and saw:

jones@gee:~$ nano ~/.bashrc

export PATH="/home/jones/miniconda3/bin:$PATH"
export PYTHONPATH=/usr/share/doc/python-catkin-pkg (i added this)
#source ~/catkin_ws/devel/setup.bash (i added this)

I do not know how to add what is needed in nano file.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-12-28 09:17:38 -0600

gvdhoorn gravatar image
Using PYTHON_EXECUTABLE: /home/jones/miniconda3/bin/python

This is the problem.

The ROS Python libraries have only been installed for the system provided Python, not for Anaconda. That is why catkin_pkg cannot be found.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2018-12-28 09:13:33 -0600

Seen: 191 times

Last updated: Dec 28 '18