Conflict anaconda vs ROS, catking_pkg not found
Hi, I recently installed anaconda in my computer, and now I cant catkin build
or catkin_make_isolated
(tried them in different ws) I use ubuntu 16.04 and ros kinetic
When running catkin build
i get this;
Errors << catkin_tools_prebuild:cmake /home/daniel/catkin_ws/logs/catkin_tools_prebuild/build.cmake.000.log
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/daniel/anaconda3/bin/python
"/opt/ros/kinetic/share/catkin/cmake/parse_package_xml.py"
"/opt/ros/kinetic/share/catkin/cmake/../package.xml"
"/home/daniel/catkin_ws/build/catkin_tools_prebuild/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:63 (safe_execute_process)
/opt/ros/kinetic/share/catkin/cmake/all.cmake:151 (_catkin_package_xml)
/opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:20 (include)
CMakeLists.txt:4 (find_package)
When running catkin_make_isolated
:
-- Using CATKIN_DEVEL_PREFIX: /home/daniel/catkin_ws2/devel_isolated/cartographer_ros_msgs
-- Using CMAKE_PREFIX_PATH: /home/daniel/catkin_ws2/install_isolated;/home/daniel/catkin_ws/devel;/opt/ros/kinetic
-- This workspace overlays: /home/daniel/catkin_ws/devel;/opt/ros/kinetic
-- Using PYTHON_EXECUTABLE: /home/daniel/anaconda3/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/daniel/catkin_ws2/build_isolated/cartographer_ros_msgs/test_results
-- Found gtest sources under '/usr/src/gtest': gtests will be built
-- Using Python nosetests: /home/daniel/anaconda3/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/daniel/anaconda3/bin/python
"/opt/ros/kinetic/share/catkin/cmake/parse_package_xml.py"
"/opt/ros/kinetic/share/catkin/cmake/../package.xml"
"/home/daniel/catkin_ws2/build_isolated/cartographer_ros_msgs/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:63 (safe_execute_process)
/opt/ros/kinetic/share/catkin/cmake/all.cmake:151 (_catkin_package_xml)
/opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:20 (include)
CMakeLists.txt:27 (find_package)
The problem I think it is that it is getting anaconda python path.
I have tried: sudo apt-get install --reinstall python-rospkg python-rosdep python-catkin-pkg python-rosinstall python-vcstools
I will list you some commands I have seen in other questions, that might be useful:
echo $PYTHONPATH
/home/daniel/catkin_ws/devel/lib/python2.7/dist-packages:/opt/ros/kinetic/lib/python2.7/dist-packages
dpkg -L python-catkin-pkg
/.
/usr
/usr/share
/usr/share/doc
/usr/share/doc/python-catkin-pkg
/usr/share/doc/python-catkin-pkg/changelog.Debian.gz
/usr/bin
/usr/bin/catkin_generate_changelog
/usr/bin/catkin_tag_changelog
/usr/bin/catkin_create_pkg
/usr/bin/catkin_test_changelog
/usr/bin/catkin_find_pkg
/usr/lib
/usr/lib/python2.7
/usr/lib/python2.7/dist-packages
/usr/lib/python2.7/dist-packages/catkin_pkg-0.3.1.egg-info
/usr/lib/python2.7/dist-packages/catkin_pkg-0.3.1.egg-info/top_level.txt
/usr/lib/python2.7/dist-packages/catkin_pkg-0.3.1.egg-info/dependency_links.txt
/usr ...
easiest would be to remove
anaconda3/bin
from yourPATH
.Here's some help from the IDE entry in the wiki