码迷,mamicode.com
首页 > 编程语言 > 详细

catkin_make broken after intalling python 3.5 with anaconda

时间:2016-12-15 07:19:57      阅读:462      评论:0      收藏:0      [点我收藏+]

标签:err   ref   3.5   default   source   exp   lte   direct   with   

"No module named catkin_pkg.package" on catkin_make w/ Indigo

I have the problem after anaconda is installed.

Solution 1: turn off anaconda

In the end of file ~/.bashrc, you will find export PATH="/home/YOURUSRNAME/anaconda3/bin:$PATH" .

In fact the ROS should use python in /opt/ros/indigo/lib/python2.7/dist-packages. Uncomment it and source ~/.bashrc then it works.

Solution 2:

http://answers.ros.org/question/220546/catkin_make-failure-due-to-python-anaconda/

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

 

Reference:

http://stackoverflow.com/questions/15236832/how-do-i-reinstall-a-directory-in-usr-bin-python

  sudo ln -s /usr/bin/python2.7 /usr/bin/python

https://linuxconfig.org/how-to-change-from-default-to-alternative-python-version-on-debian-linux

Change python version system-wide

To change python version system-wide we can use update-alternatives command. Logged in as a root user, first list all available python alternatives:

# update-alternatives --list python
update-alternatives: error: no alternatives for python

The above error message means that no python alternatives has been recognized by update-alternatives command. For this reason we need to update our alternatives table and include both python2.7 and python3.4:

# update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1
update-alternatives: using /usr/bin/python2.7 to provide /usr/bin/python (python) in auto mode
# update-alternatives --install /usr/bin/python python /usr/bin/python3.4 2
update-alternatives: using /usr/bin/python3.4 to provide /usr/bin/python (python) in auto mode

catkin_make broken after intalling python 3.5 with anaconda

标签:err   ref   3.5   default   source   exp   lte   direct   with   

原文地址:http://www.cnblogs.com/casperwin/p/6181783.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!