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
Cheers,
Thomas