Autoware CUDA build failed, required packages error about colcon, invalid syntax
Hi, I am using Ubuntu 16.04. I was trying to build the docker image of autoware.ai using CUDA and colcon, but got errors about exception loading extension related to colcon. My environment:
- Ubuntu 16.04
- CUDA 10
I have tried different versions of Autoware.ai from 1.12.0 to the latest master branch, no one is working.
Below is part of the error log. The errors keep repeating for building each package:
13:13:48 dev@lambda-quad ~/autoware.ai $ AUTOWARE_COMPILE_WITH_CUDA=1 colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release ERROR:colcon.colcon_core.entry_point:Exception loading extension 'colcon_core.task.build.python': invalid syntax (dist.py, line 585) Traceback (most recent call last): File "/usr/lib/python3/dist-packages/colcon_core/entry_point.py", line 120, in load_entry_points extension_type = load_entry_point(entry_point) File "/usr/lib/python3/dist-packages/colcon_core/entry_point.py", line 168, in load_entry_point return entry_point.load() File "/usr/local/lib/python3.5/dist-packages/pkg_resources/__init__.py", line 2450, in load return self.resolve() File "/usr/local/lib/python3.5/dist-packages/pkg_resources/__init__.py", line 2456, in resolve module = __import__(self.module_name, fromlist=['__name__'], level=0) File "/usr/lib/python3/dist-packages/colcon_core/task/python/build.py", line 8, in <module> import setuptools # noqa: F401 File "/usr/local/lib/python3.5/dist-packages/setuptools/__init__.py", line 18, in <module> from setuptools.dist import Distribution File "/usr/local/lib/python3.5/dist-packages/setuptools/dist.py", line 585 license_files: Optional[List[str]] = self.metadata.license_files ^ SyntaxError: invalid syntax ERROR:colcon.colcon_core.entry_point:Exception loading extension 'colcon_core.task.build.ros.ament_python': invalid syntax (dist.py, line 585) Traceback (most recent call last): File "/usr/lib/python3/dist-packages/colcon_core/entry_point.py", line 120, in load_entry_points extension_type = load_entry_point(entry_point) File "/usr/lib/python3/dist-packages/colcon_core/entry_point.py", line 168, in load_entry_point return entry_point.load() File "/usr/local/lib/python3.5/dist-packages/pkg_resources/__init__.py", line 2450, in load return self.resolve() File "/usr/local/lib/python3.5/dist-packages/pkg_resources/__init__.py", line 2456, in resolve module = __import__(self.module_name, fromlist=['__name__'], level=0) File "/usr/lib/python3/dist-packages/colcon_ros/task/ament_python/build.py", line 17, in <module> from colcon_core.task.python.build import PythonBuildTask File "/usr/lib/python3/dist-packages/colcon_core/task/python/build.py", line 8, in <module> import setuptools # noqa: F401 File "/usr/local/lib/python3.5/dist-packages/setuptools/__init__.py", line 18, in <module> from setuptools.dist import Distribution File "/usr/local/lib/python3.5/dist-packages/setuptools/dist.py", line 585 license_files: Optional[List[str]] = self.metadata.license_files ^ SyntaxError: invalid syntax [0.132s] ERROR:colcon.colcon_core.entry_point:Exception loading extension 'colcon_core.package_identification.python_setup_py': invalid syntax (dist.py, line 585) Traceback (most recent call last): File "/usr/lib/python3/dist-packages/colcon_core/entry_point.py", line 120, in load_entry_points extension_type = load_entry_point(entry_point) File "/usr/lib/python3/dist-packages/colcon_core/entry_point.py", line 168, in load_entry_point return entry_point.load() File "/usr/local/lib/python3.5/dist-packages/pkg_resources/__init__.py", line 2450, in load return self.resolve() File "/usr/local/lib/python3.5/dist-packages/pkg_resources/__init__.py", line 2456, in resolve module = __import__(self.module_name, fromlist ...
It looks like you might have an older version of Python. It's complaining about type annotation, which is only supported from Python 3.5+. The traceback shows
/usr/local/lib/python3.5/
, so it would be weird if you didn't actually have Python 3.5, but I don't see any other explanation for that error. If you could provide all the commands you ran, the tutorial you followed, etc., we might be able to help.If you can, maybe try to modify any command you run/dockerfile you build to add the
--include-eol-distros
option forrosdep update
. Kinetic is EOL, and it could cause some problems as you say, but this error seems unrelated.@christophebedard I have updated details of my question and the errors. I have python 3.5 installed.
--include-eol-distros
has been added before the build. I am not sure why this error happened. All I guess maybe related to the recent ROS Kinetic EOL.If you could provide all the commands you ran, the tutorial you followed, etc., we might be able to help, otherwise it's quite hard. How did you install colcon? Has colcon ever worked before on this machine/setup? Also, you say you're trying to build a dockerfile, but this looks like straight command-line.
@christophebedard Thanks for the reply. The tutorial I followed is https://github.com/Autoware-AI/autoware.ai/wiki/Source-Build. I am using Ubuntu 16.04 and CUDA 10. The only difference is I use
rosdep update --include-eol-distros
for the ros update.I was trying to build a docker image of a project based on Autoware, but got the build error. So I switched to build the Autoware.ai to see if it works, then I got the same build error.
I was able to build the Autoware.ai about 3 months ago. I use the same the same desktop and environment.