Bug#1001578: Missing egg-info folder

Christian Kastner ckk at debian.org
Thu Feb 17 16:23:38 GMT 2022


Hi Thomas,

On 2021-12-12 14:21, Thomas Perret wrote:
> Because python3-threadpoolctl deosn't install egg-info folder, when
> a python package uses pkg_resources as package discovery tool, a
> package that requires threadpoolctl in its metadata will fail to
> fullfill the necessary dependency. You can reproduce such an error by
> installing python3-setuptools, python3-pkg-resources and
> python3-sklearn packages (the later one makes a requirement to
> 'threadpoolctl>=2.0.0' in its metadata) and running:
> 
> python3 -c 'import pkg_resources; pkg_resources.working_set.resolve(pkg_resources.require("scikit-learn"))'
> [...]
> Traceback (most recent call last):
>   File "<string>", line 1, in <module>
>   File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 891, in require
>     needed = self.resolve(parse_requirements(requirements))
>   File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 777, in resolve
>     raise DistributionNotFound(req, requirers)
> pkg_resources.DistributionNotFound: The 'threadpoolctl>=2.0.0' distribution was not found and is required by scikit-learn
> 
> The easy fix is to add the following line to the
> debian/python3-threadpoolctl.install file:
> usr/lib/python*/dist-packages/threadpoolctl*.egg-info

The recent upload of threadpoolctl 3.1 comes with a dist-info, I assume
that is sufficient to resolve this issue?

>>>> import pkg_resources
>>>> pkg_resources.require('threadpoolctl')
> [threadpoolctl 3.1.0 (/usr/lib/python3/dist-packages)]


Best,
Christian



More information about the debian-science-maintainers mailing list