Problem with setuptools on fresh install
When using a fresh install, run_analysis.py
fails to run, as do the processor tests:
FAILED tests/test_nanoAOD_contents.py::test_nanoAOD_v11 - AttributeError: module 'setuptools' has no attribute 'extern'
FAILED tests/test_photonid_mva.py::test_photonid - AttributeError: module 'setuptools' has no attribute 'extern'
FAILED tests/test_processors.py::test_processors[DYStudiesProcessor] - AttributeError: module 'setuptools' has no attribute 'extern'
FAILED tests/test_processors.py::test_processors[TagAndProbeProcessor] - AttributeError: module 'setuptools' has no attribute 'extern'
FAILED tests/test_processors.py::test_processors[HHbbggProcessor] - AttributeError: module 'setuptools' has no attribute 'extern'
FAILED tests/test_processors.py::test_processors[STXSProcessor] - AttributeError: module 'setuptools' has no attribute 'extern'
FAILED tests/test_processors.py::test_processors[ParticleLevelProcessor] - AttributeError: module 'setuptools' has no attribute 'extern'
FAILED tests/test_processors.py::test_processors[TopProcessor] - AttributeError: module 'setuptools' has no attribute 'extern'
FAILED tests/test_processors.py::test_processors[ZeeProcessor] - AttributeError: module 'setuptools' has no attribute 'extern'
FAILED tests/test_selections.py::test_delta_r_mask - AttributeError: module 'setuptools' has no attribute 'extern'
From v71
onwards, setuptools.extern
was removed: https://github.com/pypa/setuptools/commit/f21bcab30b04843f362dfc450609f3df05be703f, and the issue appears to be due to uproot:
version = '1'
def parse_version(version):
"""
Converts a semver string into a Version object that can be compared with
``<``, ``>=``, etc.
Currently implemented using ``setuptools.extern.packaging.version.parse``
(exposing that library in the return type).
"""
> return setuptools.extern.packaging.version.parse(version)
E AttributeError: module 'setuptools' has no attribute 'extern'
../micromamba/envs/higgs-dna/lib/python3.10/site-packages/uproot/_util.py:99: AttributeError
This was changed in uproot from v5
onwards: https://github.com/scikit-hep/uproot5/pull/684, but we're on v4.3.7
.
A quick fix would be an upwards pin on setuptools
, as proposed in the STXS MR, but this is probably not a good idea long-term.
Edited by Tom Runting