catkin_make broken after intalling python 3.5 with anaconda
Problem
"No module named catkin_pkg.package" on catkin_make w/ Indigo
I have the problem after anaconda is installed. I get an error because of the different PYTHONPATH used by anaconda.
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.
Conclusion
Basically the problem happens because ROS is confused with python location due to different path of python used by anaconda.
Here are some reference that instructs us how to navigation the specified python.
When the system cannot position python
installed python 3.5 thenI get this error: -bash: /usr/bin/python: No such file or directory
http://stackoverflow.com/questions/15236832/how-do-i-reinstall-a-directory-in-usr-bin-python
sudo rm /usr/bin/python # because that's a corrupted file
sudo ln -s /usr/bin/python2.7 /usr/bin/python
When you need to change the default version of 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-alternativescommand. Logged in as a root user, first list all available python alternatives:# update-alternatives --list python
update-alternatives: error: no alternatives for pythonThe above error message means that no python alternatives has been recognized by
update-alternativescommand. For this reason we need to update our alternatives table and include bothpython2.7andpython3.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
When you cannot do catkin_make with the error "No module named rospkg"
http://answers.ros.org/question/39657/importerror-no-module-named-rospkg/
The reason this error occurs is because Python packages in /opt are added to PYTHONPATH environment variable BUT for ones in /usr, path does not exist in PYTHONPATH variable. The python-rospkg gets installed in /usr by default. So you just need followingline in .bashrc to fix this:
export PYTHONPATH=$PYTHONPATH:/usr/lib/python2.7/dist-packages
catkin_make broken after intalling python 3.5 with anaconda的更多相关文章
- 【Machine Learning】Python开发工具:Anaconda+Sublime
Python开发工具:Anaconda+Sublime 作者:白宁超 2016年12月23日21:24:51 摘要:随着机器学习和深度学习的热潮,各种图书层出不穷.然而多数是基础理论知识介绍,缺乏实现 ...
- Python,Pycharm,Anaconda等的关系与安装过程~为初学者跳过各种坑
1.致欢迎词 我将详讲讲述在学Python初期的各种手忙脚乱的问题的解决,通过这些步骤的操作,让你的注意力集中在Python的语法上以及后面利用Python所解决的项目问题上.而我自己作为小白,很不幸 ...
- Windows下Python 3.6 + VS2017 + Anaconda 解决Unable to find vcvarsall.bat问题
Python 3.6 + VS2017 + Anaconda 解决Unable to find vcvarsall.bat问题 已经安装了VS2017,需要将项目中的C代码翻译为Python代码,在编 ...
- 001-mac搭建Python开发环境、Anaconda、zsh兼容
一.概述 mac下搭建python环境推荐使用Anaconda+Pycharm. 1.1.Anaconda Anaconda是一个免费开源的Python和R语言的发行版本,用于计算科学(数据科学.机器 ...
- 学习python你必须弄懂的 Python、Pycharm、Anaconda 三者之间的关系
Python作为深度学习和人工智能学习的热门语言,学习一门语言,除了学会其简单的语法之外还需要对其进行运行和实现,才能实现和发挥其功能和作用.下面来介绍运行Python代码常用到的工具总结. 一.Py ...
- python和数据科学(Anaconda)
Python拥有着极其丰富且稳定的数据科学工具环境.遗憾的是,对不了解的人来说这个环境犹如丛林一般(cue snake joke).在这篇文章中,我会一步一步指导你怎么进入这个PyData丛林. 你可 ...
- Python科学计算利器——Anaconda
(搬运自我在SegmentFault的博客) 最近在用Python做中文自然语言处理.使用的IDE是PyCharm.PyCharm确实是Python开发之首选,但用于科学计算方面,还略有欠缺.为此我尝 ...
- Python - 安装并配置Anaconda环境
1- 简介 官网:https://www.anaconda.com/ Anaconda是一个用于科学计算的Python发行版,适用于数据分析的Python工具,也可以用在大数据和人工智能领域. 支持 ...
- 【Python】安装配置Anaconda
优点:解决Python 库依赖问题 清华安装镜像 https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/
随机推荐
- redmine plugin
http://wangsheng2008love.blog.163.com/blog/static/78201689200992064615770/
- linux设备驱动归纳总结(四):1.进程管理的相关概念【转】
本文转载自;http://blog.chinaunix.net/uid-25014876-id-64866.html linux设备驱动归纳总结(四):1.进程管理的相关概念 xxxxxxxxxxxx ...
- React笔记_(1)_react概述
React概述 React是一种很好的前端技术. 它将应用打散成独立的小模块,然后进行组装,完成开发. react远比angularjs难学的多. react依赖的如webpack等各种工具得先学 ...
- XCode属性面板使用说明
Xcode 中Interface Builder 工具 是一个功能强大的“所见即所得”开发工具.本文主要介绍属性面板 和 对象库面板 对象库面板: 提供了所有Cocoa Touch 库给我们定义好的 ...
- 关于easyUI在子页面增加显示tabs的一个问题
在父页面点个链接能动态看到子页面的情况太简单,请看easyUI官网:http://www.jeasyui.com/tutorial/layout/tabs2.php 现在说的是在子页面点个按钮也能触发 ...
- CaronteFX插件简介
CaronteFX是一个基于烘培的unity物理增强插件,而不是实时的. 也正因为如此可以在Cutscene中使用,而不用切到maya之类得到软件里去做,以提高效率 Adam demo里一些角色布料( ...
- git status message - Your branch is ahead of origin/master by X commits
git reset --hard origin/master git status FAQ: When I issue the "git status" command, I se ...
- range函数
th> a=torch.range(,) [.0001s] th> a [torch.DoubleTensor of size ] [.0002s] th> a=torch.rang ...
- C++中的const详解
const的用法,特别是用在函数后面 在普通的非 const成员函数中,this的类型是一个指向类类型的 const指针.可以改变this所指向的值,但不能改变 this所保存的地址. 在 const ...
- linux系统中如何查看日志 (常用命令2)
cat tail -f 日 志 文 件 说 明 /var/log/message 系统启动后的信息和错误日志,是Red Hat Linux中最常用的日志之一 /var/log/secure 与安全相关 ...