fpgmaas/deptry

scikit-learn/sklearn erroneously marked as obsolete

fpgmaas opened this issue · 2 comments

sklearn can be installed in two ways:

poetry add sklearn
poetry add scikit-learn

both install the package scikit-learn, to be imported with import sklearn

See also here on StackOverflow.

pyproject.toml:

scikit-learn = ">=0.24,<1.1"

Output of deptry:

Corresponding package name for imported module `sklearn` is `sklearn`.
pyproject.toml contains obsolete dependencies: ['scikit-learn']

Until a solution is found, the recommended workaround is to specify either sklearn or scikit-learn (or both) in ignore_dependencies in pyproject.toml:

[tool.deptry]
ignore_dependencies = [
'sklearn', 'scikit-learn'
]

Thank you this will be helpful because scikit-learn is used for pip on the installation guide.