-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
fix: No module named 'pkg_resources' #1619
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @abdrysdale ,
thank you for your contribution. Nevertheless, it is odd that installing the setuptools
is the solution for the issue. The behaviour that you are getting seems to be related with something more as we are not being able to replicate.
Here is a screenshot of a conda environment that I've just created and where I've installed ydata-profiling.
I would prefer to avoid adding the dependency to setuptools
given this is something that is only needed to be installed in case you are building python yourself.
I would put it as something optional in case the user is aware it is missing it in its environment.
Also, can you please make sure that your PR follows the naming and convention so that we are able to build the versions of the package automatically (eg. fix: (message), feat: (message), etc.) |
I've managed to confirm this on my Windows PC by running the following: def test():
# Ensure setuptools has not been installed alongside ydata_profiling
try:
import setuptools
print("Setup tools was already installed - it shouldn't be!")
assert False
except ModuleNotFoundError as exception:
assert str(exception) == "No module named 'setuptools'"
# This fails with: ModuleNotFoundError: No module named 'pkg_resources'
import ydata_profiling
if __name__ == "__main__":
test() Which fails with:
The test repository only manually installed
|
How so? Can you confirm that I've found a stack overflow post that seems to be having the same problem: https://stackoverflow.com/questions/78736427/importerror-cannot-import-name-pkg-resources-from-ydata-profiling |
Fixes #1618 add
setuptools
as a requirement.