ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A
Ask Your Question

catkin_make failure due to Python Anaconda

asked 2015-11-06 09:57:31 -0600

Ruud gravatar image

Hi all,

I have been cracking my head over this one. Recently I installed Anaconda Python for a different project. Today I tried installing ROS indigo on my 14.04 Ubuntu. When I do a catkin_make, it cannot find catkin_pkg:

-- Using PYTHON_EXECUTABLE: /home/ruud/anaconda/bin/python
-- Using Debian Python package layout
-- Using Python nosetests: /usr/bin/nosetests-2.7
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/indigo/share/catkin/cmake/safe_execute_process.cmake:11 (message):

But it is installed under the python distribution that came with ubuntu:

ruud@computer:~$ dpkg -L python-catkin-pkg

When I check which version of pyhon is being used I get:

ruud@computer:~$ python --version
Python 2.7.10 :: Anaconda 2.3.0 (64-bit)

And when I turn off Anaconda python in the .bashrc I get:

ruud@computer:~/sweeper/trunk$ python --version
Python 2.7.6

But running catkin_make in that case results in the same error above. Catkin keeps using:

  -- Using PYTHON_EXECUTABLE: /home/ruud/anaconda/bin/python

Please help!


edit retag flag offensive close merge delete


Hi :) Did you manage to crack this one?

Ahmed Abdalla gravatar imageAhmed Abdalla ( 2016-06-08 23:59:44 -0600 )edit

where you able to solve this?

Kailegh gravatar imageKailegh ( 2017-03-13 12:06:38 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2015-11-06 17:57:59 -0600

William gravatar image

Delete your build folder after turning off anaconda. CMake will cache the Python executable it finds.

edit flag offensive delete link more


Hi William,

Which build folder are you referring too, the Anaconda build folder?

If I do so, wouldn't it imply that I cannot use the Anaconda when I switch back?

I also need the Anaconda setup for another application, and recompiling and switching the whole time would not be optimal!

Thanks! Ruu

Ruud gravatar imageRuud ( 2015-11-07 04:03:50 -0600 )edit

The build folder of the catkin workspace. I don't know if it will work with the anaconda setup. I'm not sure why you need it, but it would be up to you or some other anaconda user to solve any issues that arise by making it the default python environment on your system.

William gravatar imageWilliam ( 2015-11-07 19:33:25 -0600 )edit

Awesome, that works! Good to know that CMake caches like that.

Ruud gravatar imageRuud ( 2015-11-08 09:40:11 -0600 )edit

Is there no other way? Without turning off anaconda? I need it for another project. Thanks in advance :)

Ahmed Abdalla gravatar imageAhmed Abdalla ( 2016-06-09 00:24:22 -0600 )edit

Shouldn't this read: delete your build folder after turning on anaconda ? Can't cmake find the anaconda python and cache it, this way ?

gnurf gravatar imagegnurf ( 2016-11-10 01:21:13 -0600 )edit

Without turning off anaconda, just run pip install catkin_pkg, it may be helpful.

changhai0551 gravatar imagechanghai0551 ( 2016-11-15 03:15:16 -0600 )edit

how do i turn off anaconda?

Kailegh gravatar imageKailegh ( 2017-03-13 12:07:22 -0600 )edit

Thanks for the solution, It worked for me after deleting the build, devel and logs folder.

rubanraj54 gravatar imagerubanraj54 ( 2017-05-06 06:21:51 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2015-11-06 09:57:31 -0600

Seen: 6,078 times

Last updated: Nov 06 '15