Skip to content

[BUG] install_gs.sh failing: canonicalize_version() got an unexpected keyword argument 'strip_trailing_zero' #373

@StephenCarlson

Description

@StephenCarlson

Describe the bug
I'm following the instruction for the Ubuntu Ground Station, everything is working up to sudo ./scripts/install_gs.sh <my_specific_wifi_alias_here>. This is the error I'm getting:

virtualenv --python=/usr/bin/python3 /home/steve/dev/wfb-ng/env
Traceback (most recent call last):
  File "/usr/bin/virtualenv", line 5, in <module>
    from virtualenv.__main__ import run_with_catch
  File "/usr/lib/python3/dist-packages/virtualenv/__init__.py", line 3, in <module>
    from .run import cli_run, session_via_cli
  File "/usr/lib/python3/dist-packages/virtualenv/run/__init__.py", line 14, in <module>
    from .plugin.creators import CreatorSelector
  File "/usr/lib/python3/dist-packages/virtualenv/run/plugin/creators.py", line 6, in <module>
    from virtualenv.create.via_global_ref.builtin.builtin_way import VirtualenvBuiltin
  File "/usr/lib/python3/dist-packages/virtualenv/create/via_global_ref/builtin/builtin_way.py", line 7, in <module>
    from virtualenv.create.creator import Creator
  File "/usr/lib/python3/dist-packages/virtualenv/create/creator.py", line 15, in <module>
    from virtualenv.discovery.cached_py_info import LogCmd
  File "/usr/lib/python3/dist-packages/virtualenv/discovery/cached_py_info.py", line 23, in <module>
    _CACHE[Path(sys.executable)] = PythonInfo()
  File "/usr/lib/python3/dist-packages/virtualenv/discovery/py_info.py", line 86, in __init__
    self.distutils_install = {u(k): u(v) for k, v in self._distutils_install().items()}
  File "/usr/lib/python3/dist-packages/virtualenv/discovery/py_info.py", line 161, in _distutils_install
    i.finalize_options()
  File "/usr/local/lib/python3.10/dist-packages/setuptools/command/install.py", line 67, in finalize_options
    super().finalize_options()
  File "/usr/local/lib/python3.10/dist-packages/setuptools/_distutils/command/install.py", line 408, in finalize_options
    'dist_fullname': self.distribution.get_fullname(),
  File "/usr/local/lib/python3.10/dist-packages/setuptools/_core_metadata.py", line 267, in get_fullname
    return _distribution_fullname(self.get_name(), self.get_version())
  File "/usr/local/lib/python3.10/dist-packages/setuptools/_core_metadata.py", line 285, in _distribution_fullname
    canonicalize_version(version, strip_trailing_zero=False),
TypeError: canonicalize_version() got an unexpected keyword argument 'strip_trailing_zero'

To Reproduce

  • From an Ubuntu 22.04 LTS install, follow the normal installation procedure per the README.md: https://github.com/svpcom/wfb-ng?tab=readme-ov-file#quick-start-using-debian-or-ubuntu-ground-station
  • I've tried various means to fix the issue, such as python -m pip install --upgrade pip setuptools, or downgrading the setuptools package via python -m pip install setuptools==70.3.0. No other steps attempted except sudo make clean between attempts at executing sudo ./scripts/install_gs.sh wlx00c0cab3e254
  • I have also tried different versions of the project, with git checkout master, git checkout stable, or other specific releases, with appropriate git reset --hard HEAD or equivalent commands to clean the repo state.

Expected behavior
Normal installation per the README.md instructions.

Your setup (please complete the following information):

Additional configuration notes:
Python 3.10.12
pip 24.2 from /usr/local/lib/python3.10/dist-packages/pip (python 3.10)
Python setuptools version 70.3.0, downgraded from 75.1.0 (I've tried both, downgrading does nothing to correct the issue)

Additional context
I've found the following hints as to why things are breaking, it seems they have changed the behavior by design:
pypa/setuptools#4483
pypa/setuptools#4496

Also, I've found this closed issue from a few weeks ago, for a similar issue with the build system:
#349

Confirm you read

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions