ubuntu - 仅使用 Python 3 安装 ROS 旋律且不会弄乱系统库?
问题描述
流程及问题说明:
我正在按照那里的安装指南:
http ://wiki.ros.org/melodic/Installation/Ubuntu
但:
$ sudo apt-get install ros-melodic-desktop-full
不起作用:Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: ros-melodic-desktop-full : Depends: ros-melodic-perception but it is not going to be installed E: Unable to correct problems, you have held broken packages.
-> 问题 1。
$ sudo apt-get install ros-melodic-desktop-full
似乎工作,但它需要安装一大堆包(602 MB) - 我有点期待。在详细查看这些包时,我可以看到:超过 190 个 ros-something-packages:好的
一些新的库:好的
超过 40 个
python-<packages>
(绝对是 Python 2 包):-> 问题 2.1超过 80
libboost-<something-system-libraries>
: -> 问题 2.2
相关问题:
问题一:
你知道为什么吗?
问题 2.1:
如何强制使用这些包的 Python 3 版本?
问题 2.2:
出于其他目的,我从源代码构建提升(Building Boost from sources on Linux)。
因此,我担心如果我安装了所有这些依赖项的 ros,那么随附的boost系统库ros
(都是 boost 版本1.65)会弄乱我对 boost 库的个性化安装(版本是1.68),尤其是当我想编译其他软件(我希望这些库只有一个版本;即最新的 1.68)。
有没有办法告诉ros
使用这些已经安装的库(基本上在/usr/local/
)?
一般信息:
我使用的是 Ubuntu 18.04:4.15.0-43-generic x86_64 GNU/Linux
Python 3 版本是:3.6.7
解决方案
为了使 ROS 系统正常工作,它需要最低特定版本的依赖项。
您不能在安装中使用 python 3,因为所有工具都是使用 python 2.7+ 制作的,但是您可以通过更改ROS_PYTHON_VERSION
为 3 来指定运行或编译包时要使用的 python 版本。
我认为您可以使用此答案将编译的源代码转换为.deb
文件并安装它以防止 apt 干扰您的 boost 库
推荐阅读
- java - StringEscapeUtils 以 unicode 显示日语
- azure - Azure Active Directory - 是否有创建自定义域的方法?
- android - 循环播放 .wav 文件,然后播放 Android Text To Speech
- c++ - 无后缀的十六进制文字的“缩小转换”警告?
- aspnetboilerplate - 未实现检索使用 PublishAsync 方法插入的通知的 id
- python - 在 Python 中计算 Unicode 文本中非间距字符的最快方法
- c - 如何在 J1939 协议中声明地址
- node.js - 节点。SyntaxError:无法解析 JSON 正文:输入意外结束
- angular - ./node_modules/@angular/cdk/esm5/table.es5.js 找不到模块:错误:无法解析 '../../\node_modules\@angular\cdk\esm5' 中的 '@angular/common'
- tinymce - 如何在tinymce的“文本”选项卡中插入b-quote、del、ins、img、更多、关闭标签按钮