代码之家  ›  专栏  ›  技术社区  ›  swiss_knight

ROS melodic安装仅使用Python3,并且不会弄乱系统库?

  •  2
  • swiss_knight  · 技术社区  · 7 年前

    程序和问题说明:


    http://wiki.ros.org/melodic/Installation/Ubuntu

    但是:

    1. $ 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。

    2. 似乎可以工作,但它需要安装一整套软件包(602MB)——这是我所期望的。详细查看这些软件包时,我可以看到:

      • 超过190个软件包:好的

      • 一些新的图书馆:好的

      • python-<packages> (绝对是Python 2包):>问题2.1

      • libboost-<something-system-libraries> :->问题2.2

    问题1:

    你知道为什么吗?

    问题2.2:

    出于其他目的,我从源代码构建boost( Building Boost from sources on Linux ).
    因此,我担心如果我安装具有所有这些依赖项的ros boost 随附的系统库 ros (这些都是boost版本 1.65 1.68
    有没有办法告诉我 活性氧 使用这些已安装的库(基本上在 /usr/local/ )?

    一般资料:

    我正在使用Ubuntu 18.04: 4.15.0-43-generic x86_64 GNU/Linux Python 3版本为: 3.6.7

    1 回复  |  直到 7 年前
        1
  •  1
  •   Mohammad Ali    7 年前

    为了使ROS系统能够工作,它需要至少一个特定版本的依赖关系。

    ROS_PYTHON_VERSION 到3。

    我想你可以用 This Answer 将编译后的源代码转换为 .deb 归档并安装它,以防止apt干扰您的boost库

        2
  •  0
  •   Suraj Mahangade    5 年前

    如果你用水蟒,试试这个

    conda create -n ros python=3.7

    conda activate ros

    pip install rospy rospkg

    这对我有用。 只需以类似的方式安装任何其他软件包pip install package name

    推荐文章