rickstaa/.ros_conda_wrapper

Only works with catkin_make and not catkin build

Closed this issue · 2 comments

Describe the bug
The conda wrapper appears only to work with the catkin_make package nad not thecatkin build tool.

To Reproduce
Steps to reproduce the behavior:

  1. Source the .conda_wrapper
  2. Try to build a ROS package using catkin build
  3. See error:
catkin build -DPYTHON_EXECUTABLE="$(which python)" -DPYTHON_LIBRARY="$(find $(which python | sed -e 's/\/bin\/python//') -iname libpython*m.s
o)" -DPYTHON_INCLUDE_DIR="$(find $(which python | sed -e 's/\/bin\/python//')/include -iname python*m)"
Traceback (most recent call last):
  File "/usr/bin/catkin", line 11, in <module>
    load_entry_point('catkin-tools==0.4.5', 'console_scripts', 'catkin')()
  File "/opt/conda/envs/autograsp/lib/python3.7/site-packages/pkg_resources/__init__.py", line 489, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/opt/conda/envs/autograsp/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2843, in load_entry_point
    return ep.load()
  File "/opt/conda/envs/autograsp/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2434, in load
    return self.resolve()
  File "/opt/conda/envs/autograsp/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2440, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/lib/python2.7/dist-packages/catkin_tools/commands/catkin.py", line 30, in <module>
    from catkin_tools.config import get_verb_aliases
  File "/usr/lib/python2.7/dist-packages/catkin_tools/config.py", line 18, in <module>
    import yaml
  File "/opt/conda/envs/autograsp/lib/python3.7/site-packages/yaml/__init__.py", line 374
    class YAMLObject(metaclass=YAMLObjectMetaclass):
                              ^
SyntaxError: invalid syntax

Expected behavior
The package should build succesfully like this is the case while using catkin_make.

Desktop (please complete the following information):

  • OS: Linux ubuntu 16.04

Possible solution
Implement additional wrapping around the catkin build command see this command. Making sure it points to a python2 environment. Or the solution given by gvdhoorn

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.93. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

Fixed in v0.0.4 (Released).