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

[BUG] Undeclared dependency on setuptools (pkg_resources) #2557

Closed
rodolfocarobene opened this issue Jun 3, 2023 · 1 comment
Closed

[BUG] Undeclared dependency on setuptools (pkg_resources) #2557

rodolfocarobene opened this issue Jun 3, 2023 · 1 comment

Comments

@rodolfocarobene
Copy link

Hello,
recently, we encountered an error using Dash, related to the use of pkg_resources.

In particular, our project depends on dash, but not on setuptools (pkg_resources is distributed with it), so we were getting an error during testing:

.../.../.venv/lib/python3.9/site-packages/dash/dash.py", line 21, in <module>
    from pkg_resources import get_distribution, parse_version
ModuleNotFoundError: No module named 'pkg_resources'

The error is related to this line:

from pkg_resources import get_distribution, parse_version

So at the moment dash is actually depending on setuptools without declaring it.

Moreover, the use of pkg_resources seems to be deprecated (https://setuptools.pypa.io/en/latest/pkg_resources.html) in favour of importlib.metadata (https://docs.python.org/3/library/importlib.metadata.html).

For our project, we can fix the issue adding the dependency on setuptools, but it's probably better if dash add it (or remove it completely).
Thanks in advance! :-)

@rodolfocarobene
Copy link
Author

I think this is now fixed. Thanks!

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

No branches or pull requests

1 participant