rosdep init fails with a syntax error
Let me set the stage: I'm running an older 32-bit platform, so I'm running Ubuntu 16.04. I'm following the "build Foxy from source" tutorial: https://index.ros.org/doc/ros2/Instal... At the step to run sudo rosdep init, this is the error I get:
nc10user@nc10user-NC10:~/ros2_foxy$ sudo rosdep -E init
Traceback (most recent call last):
File "/usr/bin/rosdep", line 10, in <module>
from importlib.metadata import distribution
ImportError: No module named 'importlib.metadata'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/rosdep", line 13, in <module>
from importlib_metadata import distribution
File "/home/nc10user/.local/lib/python3.5/site-packages/importlib_metadata/__init__.py", line 88
dist: Optional['Distribution'] = None
^
SyntaxError: invalid syntax
nc10user@nc10user-NC10:~/ros2_foxy$
my ROS env is tainted from a previous ROS1 install of kinetic, see my ROS env
nc10user@nc10user-NC10:~/ros2_foxy$ env | grep ROS
ROS_ROOT=/opt/ros/kinetic/share/ros
ROS_PACKAGE_PATH=/opt/ros/kinetic/share
ROS_MASTER_URI=http://localhost:11311
ROS_PYTHON_VERSION=2
ROS_VERSION=1
ROSLISP_PACKAGE_DIRECTORIES=
ROS_DISTRO=kinetic
ROS_ETC_DIR=/opt/ros/kinetic/etc/ros
I am wondering if this has anything to do with your OS since Foxy is primarily supported on Ubuntu 20.04