Fresh macOS install, ros2 errors out with PackageNotFoundError ros2cli message

asked 2021-11-30 20:28:20 -0500

mthirumalai gravatar image

updated 2021-12-01 19:32:57 -0500

osilva gravatar image

I just installed ros2 on my macos using instructions https://docs.ros.org/en/crystal/Insta... That went smoothly except I had to upgrade the OS version in the middle when "python3 -m pip install pygraphviz pydot" failed (probably not relevant).

The environment setup was bumpy but I got through it mthirumalai@Madhavans-MacBook-Air-2 dev % . ~/ros2_crystal/ros2-osx/setup.bash not found: "/Users/mthirumalai/dev/local_setup.bash"

// It's looking for a local_setup.bash in the current directory. Let me create one mthirumalai@Madhavans-MacBook-Air-2 dev % touch /Users/mthirumalai/dev/local_setup.bash mthirumalai@Madhavans-MacBook-Air-2 dev %

// ok ... not sure that worked but it stopped complaining. Let's try running ros2 mthirumalai@Madhavans-MacBook-Air-2 dev % ros2 run demo_nodes_cpp talker zsh: command not found: ros2

// path is screwed up. Let's type in full path. mthirumalai@Madhavans-MacBook-Air-2 dev % ~/ros2_crystal/ros2-osx/bin/ros2 Traceback (most recent call last): File "/Users/mthirumalai/ros2_crystal/ros2-osx/bin/ros2", line 33, in <module> sys.exit(load_entry_point('ros2cli==0.9.10', 'console_scripts', 'ros2')()) File "/Users/mthirumalai/ros2_crystal/ros2-osx/bin/ros2", line 22, in importlib_load_entry_point for entry_point in distribution(dist_name).entry_points File "/usr/local/Cellar/python@3.9/3.9.9/Fr...", line 524, in distribution return Distribution.from_name(distribution_name) File "/usr/local/Cellar/python@3.9/3.9.9/Fr...", line 187, in from_name raise PackageNotFoundError(name) importlib.metadata.PackageNotFoundError: ros2cli</module>

// missing package .... Is this because of a bad install or a bad environment setup or something else. // TBC, same error with ~/ros2_crystal/ros2-osx/bin/ros2 run demo_nodes_cpp talker // and with python client

edit retag flag offensive close merge delete