Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undeclared runtime dependency on setuptools #984

Closed
flying-sheep opened this issue Mar 25, 2024 · 1 comment · Fixed by #986
Closed

Undeclared runtime dependency on setuptools #984

flying-sheep opened this issue Mar 25, 2024 · 1 comment · Fixed by #986

Comments

@flying-sheep
Copy link

When I try to use dask_ml, I get

>   from pkg_resources import DistributionNotFound, get_distribution
E   ModuleNotFoundError: No module named 'pkg_resources'

https://github.com/dask/dask-ml/blob/b3954e9ee1f7d7dee5ebdd5c4ca1b84f4dd96797/dask_ml/__init__.py#L1C6-L1C19

You need to either declare a runtime dependency on setuptools, or, much better, stop using the deprecated pkg_resources and use importlib.metadata from Python’s standard library instead: from importlib.metadata import version

TomAugspurger added a commit to TomAugspurger/dask-ml that referenced this issue Mar 30, 2024
- Use pyproject.toml, hatch, hatch-vcs
- Use ruff

Closes dask#984
TomAugspurger added a commit that referenced this issue Mar 30, 2024
* Packaging updates

- Use pyproject.toml, hatch, hatch-vcs
- Use ruff

Closes #984

* restore env

* ignore _version
@flying-sheep
Copy link
Author

That solution is of course even better

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant