carla-simulator/ros-bridge

Unable to compile ros_compatibility

danicannt opened this issue · 1 comments

Hi everyone,

I am experiencing an issue while trying to compile the ros_compatibility package on my system, which is running Ubuntu 22, ros humble and Python 3.10. The package fails with the following error:

Failed   <<< ros_compatibility [0.35s, exited with code 1]

Summary: 1 package finished [2.75s]
  1 package failed: ros_compatibility
  1 package had stderr output: ros_compatibility
  17 packages not processed
Expected ['/usr/bin/python3', 'setup.py', '--help-commands'] to pass: Traceback (most recent call last):
  File "/home/usuario/workspaces/fite_carla_ws/src/carla-ros-bridge/ros_compatibility/setup.py", line 20, in <module>
    setup(
  File "/home/usuario/.local/lib/python3.10/site-packages/setuptools/__init__.py", line 161, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python3.10/distutils/core.py", line 134, in setup
    ok = dist.parse_command_line()
  File "/usr/lib/python3.10/distutils/dist.py", line 480, in parse_command_line
    if self.handle_display_options(option_order):
  File "/home/usuario/.local/lib/python3.10/site-packages/setuptools/dist.py", line 1003, in handle_display_options
    return _Distribution.handle_display_options(self, option_order)
  File "/usr/lib/python3.10/distutils/dist.py", line 683, in handle_display_options
    self.print_commands()
  File "/home/usuario/.local/lib/python3.10/site-packages/setuptools/dist.py", line 773, in print_commands
    cmdclass = ep.resolve()
  File "/home/usuario/.local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 2467, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/home/usuario/.local/lib/python3.10/site-packages/setuptools/command/bdist_wininst.py", line 1, in <module>
    import distutils.command.bdist_wininst as orig
ModuleNotFoundError: No module named 'distutils.command.bdist_wininst'

It seems to be related to distutils and the missing bdist_wininst module. I’ve verified that both Python 3.10 and distutils are installed on my system, but I’m still encountering this error.

Has anyone else run into a similar issue with Python 3.10 on Ubuntu 22, or know if there’s a workaround for this? Should I downgrade my Python version to 3.8, or is there another solution?

Any help would be greatly appreciated!

Thanks in advance!

In order to solve this I had to dowgrade my setptools package:

pip install setuptools==58.2.0