0
$\begingroup$

I am following the instructions for building ROS 2 (Humble) on MacOS Sonoma 14.5. When I get to the part about cloning the ROS 2 repo, vcs fails with this error:

vcs import --input https://raw.githubusercontent.com/ros2/ros2/humble/ros2.repos src
Traceback (most recent call last):
  File "/Users/ryanolson/ros2env/bin/vcs", line 5, in <module>
    from vcstool.commands.vcs import main
  File "/Users/ryanolson/ros2env/lib/python3.12/site-packages/vcstool/commands/vcs.py", line 3, in <module>
    from vcstool.commands.help import get_entrypoint
  File "/Users/ryanolson/ros2env/lib/python3.12/site-packages/vcstool/commands/help.py", line 4, in <module>
    from pkg_resources import load_entry_point
  File "/Users/ryanolson/ros2env/lib/python3.12/site-packages/pkg_resources/__init__.py", line 2172, in <module>
    register_finder(pkgutil.ImpImporter, find_on_path)
                    ^^^^^^^^^^^^^^^^^^^
AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'?

I noticed that the same error happens any time I run vcs (such as vcs -h).

I got vcstool from step 5 in the tutorial (python3 -m pip install -U ...). I am using a custom venv to get around the "externally managed environment" warning from pip.

Llama LLM has suggested that my python version (3.12.4) may be too new for vcstool, but I have not been able to verify that separately. Any suggestions? Thanks

$\endgroup$

1 Answer 1

1
$\begingroup$

Turns out that vcstool is indeed not compatible with Python 3.12.

The workaround for me was to create a venv with Python 3.9 and install/run vcs from there just to grab the ROS2 source code. I then went back to my ROS venv for the build.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.