Skip to content

Running svtk from source with Python >= 3.9.23 returns an error #883

@kjaisingh

Description

@kjaisingh

Affected module(s) or script(s)

svtk in local execution.

Affected version(s)

Main branch.

Mode

Either.

Runtime environment

Python 3.9.23, though also appears to affect any more recent versions of Python too. Note that svtk was installed from source via pip install -e ./src/svtk.

Description

Running svtk commands on my local system result in an error.

I believe it can be resolved by removing the line:

from .helpers import reciprocal_overlap, overlap_frac

in src/svtk/svtk/utils/__init__.py.

Steps to reproduce

Run any svtk command locally.

Expected behavior

Successful execution of svtk command.

Actual behavior

I see the following error:

/path-to-source-code/gatk-sv/src/svtk/svtk/__init__.py:1: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
  from pkg_resources import get_distribution
Traceback (most recent call last):
  File "/path-to-conda-environment/bin/svtk", line 40, in <module>
    import svtk.cli as cli
  File "/path-to-source-code/gatk-sv/src/svtk/svtk/cli/__init__.py", line 1, in <module>
    from .vcfcluster import main as vcfcluster
  File "/path-to-source-code/gatk-sv/src/svtk/svtk/cli/vcfcluster.py", line 22, in <module>
    from svtk.vcfcluster import VCFCluster
  File "/path-to-source-code/gatk-sv/src/svtk/svtk/vcfcluster.py", line 18, in <module>
    from svtk.svfile import SVFile, SVRecordCluster, SVRecord
  File "/path-to-source-codegatk-sv/src/svtk/svtk/svfile.py", line 11, in <module>
    from .utils import recip, make_bnd_alt, update_best_genotypes, get_called_samples
  File "/path-to-source-code/gatk-sv/src/svtk/svtk/utils/__init__.py", line 3, in <module>
    from .helpers import reciprocal_overlap, overlap_frac
ModuleNotFoundError: No module named 'svtk.utils.helpers'

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions