我在我的 ros 工作区中使用 colcon buil 命令,出现以下错误:R_X86_64_TPOFF32

我在我的 ros 工作区中使用 colcon buil 命令,出现以下错误:R_X86_64_TPOFF32

当我进入我的 ros 工作区并使用以下命令时 - colcon build,我看到以下错误消息,

ERROR:colcon.colcon_core.extension_point:Exception loading extension 'colcon_core.verb.version-check': module 'pkgutil' has no attribute 'ImpImporter'
Traceback (most recent call last):
  File "/home/goutham/.local/lib/python3.12/site-packages/colcon_core/extension_point.py", line 124, in load_extension_points
    extension_type = load_extension_point(name, value, group)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/goutham/.local/lib/python3.12/site-packages/colcon_core/extension_point.py", line 165, in load_extension_point
    return EntryPoint(name, value, group).load()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/importlib/metadata/__init__.py", line 205, in load
    module = import_module(match.group('module'))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)```

How to specify a different python version for this workspace, I have installed these 2 versions of  python:
```goutham@goutham-11-11:~/voidwalking/scripts$ python3 --version
Python 3.12.2
goutham@goutham-11-11:~/voidwalking/scripts$ python --version
Python 3.10.12```

I am also getting this following error when along with the ones mentioned above,

```[0.782s] ERROR:colcon.colcon_core.extension_point:Exception loading extension 'colcon_core.package_augmentation.ros_ament_python': No module named 'distutils'
Traceback (most recent call last):
  File "/home/goutham/.local/lib/python3.12/site-packages/colcon_core/extension_point.py", line 124, in load_extension_points
    extension_type = load_extension_point(name, value, group)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/goutham/.local/lib/python3.12/site-packages/colcon_core/extension_point.py", line 165, in load_extension_point
    return EntryPoint(name, value, group).load()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/importlib/metadata/__init__.py", line 205, in load
    module = import_module(match.group('module'))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)```

Please help me in this, also please answer to accordingly to each of the questions, this would be of great help.

相关内容