Skip to content

RGT package on PyPi does not install due to deprecation of numpy.distutils #291

Description

@gitozi

Even with our almost one year old versions (python 3.12.3 , numpy 1.26.4) it is not possible to install RGT obviously due to the use of the deprecated numpy.distutils in hmmlearn as a subpackage/dependency of RGT 1.0.2.
Setting up a VM with older versions of python/numpy just for RGT does not make much sense for me. Current versions in most distributions are the 3.13.x series of python and numpy >2.0.0 .

error msg:
`
python -m pip install RGT
Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com
Collecting RGT
Downloading RGT-1.0.2.tar.gz (36.8 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 36.8/36.8 MB 147.8 MB/s eta 0:00:00
Preparing metadata (setup.py) ... done
Requirement already satisfied: cython in /p/software/default/stages/2025/software/Cython/3.0.10-GCCcore-13.3.0/lib/python3.12/site-packages (from RGT) (3.0.10)
Requirement already satisfied: numpy>=1.4.0 in /p/software/default/stages/2025/software/SciPy-bundle/2024.05-gcccoreflexiblas-13.3.0-3.4.4/lib/python3.12/site-packages (from RGT) (1.26.4)
Requirement already satisfied: scipy>=1.0.0 in /p/software/default/stages/2025/software/SciPy-bundle/2024.05-gcccoreflexiblas-13.3.0-3.4.4/lib/python3.12/site-packages (from RGT) (1.13.1)
Collecting pysam>=0.12.0 (from RGT)
Downloading pysam-0.23.3-cp312-cp312-manylinux_2_28_x86_64.whl.metadata (1.7 kB)
Collecting pyBigWig (from RGT)
Downloading pyBigWig-0.3.24-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (19 kB)
Requirement already satisfied: Biopython>=1.64 in ./.local/lib/python3.12/site-packages (from RGT) (1.85)
Collecting fisher>=0.1.5 (from RGT)
Downloading fisher-0.1.14.tar.gz (22 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting moods-python>=1.9.4.1 (from RGT)
Downloading MOODS-python-1.9.4.1.tar.gz (250 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 250.9/250.9 kB 210.8 MB/s eta 0:00:00
Preparing metadata (setup.py) ... done
Collecting scikit-learn>=0.19.0 (from RGT)
Downloading scikit_learn-1.7.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (17 kB)
Collecting hmmlearn==0.2.2 (from RGT)
Downloading hmmlearn-0.2.2.tar.gz (146 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 146.4/146.4 kB 102.8 MB/s eta 0:00:00
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [83 lines of output]
/tmp/pip-install-0zmwfiho/hmmlearn_49750eaaaef14ba39def4a52906892ce/setup.py:17: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
if LooseVersion(setuptools.version) < "36.2":
/p/software/jurecadc/stages/2025/software/Python/3.12.3-GCCcore-13.3.0/lib/python3.12/site-packages/setuptools/init.py:80: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!

          ********************************************************************************
          Requirements should be satisfied by a PEP 517 installer.
          If you are using pip, you can try `pip install --use-pep517`.
          ********************************************************************************
  
  !!
    dist.fetch_build_eggs(dist.setup_requires)
  [07/07/25 16:58:04] WARNING  toml section missing        pyproject_reading.py:42
                               'pyproject.toml does not
                               contain a
                               tool.setuptools_scm
                               section'
                               Traceback (most recent call
                               last):
                                 File
                               "/p/software/jurecadc/stage
                               s/2025/software/Python/3.12
                               .3-GCCcore-13.3.0/lib/pytho
                               n3.12/site-packages/setupto
                               ols_scm/_integration/pyproj
                               ect_reading.py", line 36,
                               in read_pyproject
                                   section =
                               defn.get("tool",
                               {})[tool_name]
                                             ~~~~~~~~~~~~~
                               ~~~~~~~^^^^^^^^^^^
                               KeyError: 'setuptools_scm'
  running egg_info
  creating /tmp/pip-pip-egg-info-032c6a9o/hmmlearn.egg-info
  writing /tmp/pip-pip-egg-info-032c6a9o/hmmlearn.egg-info/PKG-INFO
  writing dependency_links to /tmp/pip-pip-egg-info-032c6a9o/hmmlearn.egg-info/dependency_links.txt
  writing requirements to /tmp/pip-pip-egg-info-032c6a9o/hmmlearn.egg-info/requires.txt
  writing top-level names to /tmp/pip-pip-egg-info-032c6a9o/hmmlearn.egg-info/top_level.txt
  writing manifest file '/tmp/pip-pip-egg-info-032c6a9o/hmmlearn.egg-info/SOURCES.txt'
  INFO: Disabling color, you really want to install colorlog.
  Disabling color, you really want to install colorlog.
  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "/tmp/pip-install-0zmwfiho/hmmlearn_49750eaaaef14ba39def4a52906892ce/setup.py", line 47, in <module>
      setup(
    File "/p/software/jurecadc/stages/2025/software/Python/3.12.3-GCCcore-13.3.0/lib/python3.12/site-packages/setuptools/__init__.py", line 103, in setup
      return distutils.core.setup(**attrs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/p/software/jurecadc/stages/2025/software/Python/3.12.3-GCCcore-13.3.0/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 184, in setup
      return run_commands(dist)
             ^^^^^^^^^^^^^^^^^^
    File "/p/software/jurecadc/stages/2025/software/Python/3.12.3-GCCcore-13.3.0/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 200, in run_commands
      dist.run_commands()
    File "/p/software/jurecadc/stages/2025/software/Python/3.12.3-GCCcore-13.3.0/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
      self.run_command(cmd)
    File "/p/software/jurecadc/stages/2025/software/Python/3.12.3-GCCcore-13.3.0/lib/python3.12/site-packages/setuptools/dist.py", line 968, in run_command
      super().run_command(command)
    File "/p/software/jurecadc/stages/2025/software/Python/3.12.3-GCCcore-13.3.0/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "/p/software/jurecadc/stages/2025/software/Python/3.12.3-GCCcore-13.3.0/lib/python3.12/site-packages/setuptools/command/egg_info.py", line 321, in run
      self.find_sources()
    File "/p/software/jurecadc/stages/2025/software/Python/3.12.3-GCCcore-13.3.0/lib/python3.12/site-packages/setuptools/command/egg_info.py", line 329, in find_sources
      mm.run()
    File "/p/software/jurecadc/stages/2025/software/Python/3.12.3-GCCcore-13.3.0/lib/python3.12/site-packages/setuptools/command/egg_info.py", line 550, in run
      self.add_defaults()
    File "/p/software/jurecadc/stages/2025/software/Python/3.12.3-GCCcore-13.3.0/lib/python3.12/site-packages/setuptools/command/egg_info.py", line 588, in add_defaults
      sdist.add_defaults(self)
    File "/p/software/jurecadc/stages/2025/software/Python/3.12.3-GCCcore-13.3.0/lib/python3.12/site-packages/setuptools/command/sdist.py", line 102, in add_defaults
      super().add_defaults()
    File "/p/software/jurecadc/stages/2025/software/Python/3.12.3-GCCcore-13.3.0/lib/python3.12/site-packages/setuptools/_distutils/command/sdist.py", line 250, in add_defaults
      self._add_defaults_ext()
    File "/p/software/jurecadc/stages/2025/software/Python/3.12.3-GCCcore-13.3.0/lib/python3.12/site-packages/setuptools/_distutils/command/sdist.py", line 334, in _add_defaults_ext
      build_ext = self.get_finalized_command('build_ext')
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/p/software/jurecadc/stages/2025/software/Python/3.12.3-GCCcore-13.3.0/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 303, in get_finalized_command
      cmd_obj.ensure_finalized()
    File "/p/software/jurecadc/stages/2025/software/Python/3.12.3-GCCcore-13.3.0/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 111, in ensure_finalized
      self.finalize_options()
    File "/tmp/pip-install-0zmwfiho/hmmlearn_49750eaaaef14ba39def4a52906892ce/setup.py", line 28, in finalize_options
      import numpy.distutils
  ModuleNotFoundError: No module named 'numpy.distutils'
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions