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

Unable to import whylogs #1041

Closed
1 task done
mayankjobanputra opened this issue Jan 3, 2023 · 5 comments · Fixed by #1044
Closed
1 task done

Unable to import whylogs #1041

mayankjobanputra opened this issue Jan 3, 2023 · 5 comments · Fixed by #1044
Assignees

Comments

@mayankjobanputra
Copy link

mayankjobanputra commented Jan 3, 2023

Description

Unable to import whylogs

>>> import whylogs as why
gives AttributeError: module 'site' has no attribute 'getsitepackages'

Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/monk/why/lib/python3.7/site-packages/whylogs/__init__.py", line 29, in <module> from .api.usage_stats import emit_usage as __emit_usage_stats File "/home/monk/why/lib/python3.7/site-packages/whylogs/api/usage_stats/__init__.py", line 30, in <module> _SITE_PACKAGES = site.getsitepackages() AttributeError: module 'site' has no attribute 'getsitepackages'

  • System info

    • Operating system and version: Ubuntu 18.04
    • Tried on Python3.7, Python3.8, Python3.9
    • virtualenv
  • Steps to reproduce:

    • Create a virtualenv -- virtualenv why --python=python3.7
    • activate the virtualenv -- source why/bin/activate
    • pip install whylogs
    • python
    • import whylogs

Although I was able to install this on colab. I don't know why it's not working on my local machine.

@jamie256 jamie256 self-assigned this Jan 3, 2023
@jamie256
Copy link
Contributor

jamie256 commented Jan 5, 2023

Its a virtualenv issue, I was able to repro on docker image using ubuntu 18.04, thanks for the details, fix pending.

@mayankjobanputra
Copy link
Author

Somehow it works out of the box on Colab. I will keep looking for a solution/workaround for this also. :)

@mayankjobanputra
Copy link
Author

Thanks a lot @jamie256 :)

@jamie256
Copy link
Contributor

jamie256 commented Jan 6, 2023

I published a dev release off mainline after this was merged if you want to test this out:
pip install whylogs==1.1.21.dev0

@mayankjobanputra
Copy link
Author

It's working 🥇

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.

2 participants