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

[question] How to import string_grouper_utils? #61

Open
MauKruisheer opened this issue Jul 31, 2021 · 5 comments
Open

[question] How to import string_grouper_utils? #61

MauKruisheer opened this issue Jul 31, 2021 · 5 comments

Comments

@MauKruisheer
Copy link

Hi all, I think this is a very simple question, but how can one import the string_grouper_utils module? I've installed string_grouper via pip install, but cannot seem to access the modules within string_grouper_utils, such as new_group_rep_by_highest_weight. Anyone?

@ParticularMiner
Copy link
Contributor

@MauKruisheer

from string_grouper_utils import new_group_rep_by_highest_weight, \
    new_group_rep_by_earliest_timestamp, new_group_rep_by_completeness

(As detailed in this link.)

@MauKruisheer
Copy link
Author

@ParticularMiner thanks for the input. I tried that, but received this error:
ModuleNotFoundError: No module named 'string_grouper_utils'

Somehow string_grouper works, but string_grouper_utils cannot be found

@ParticularMiner
Copy link
Contributor

@MauKruisheer

You are right. It seems you've discovered a bug as I'm also able to reproduce this error. I'm not sure how this bug crept in, since it has always worked before. Perhaps this is due to a recent upgrade of pip.

Anyway I've also found a fix for this but I'm not sure how long it will take to reach the main branch.

If you are willing to download the package files from GitHub instead of pypi.org then I could help you. Let me know if you are willing then I'll direct you to the relevant branch. Otherwise you'd have to wait until string_grouper is updated on pypi.org and that could take a while.

Meanwhile, many thanks for bringing this to our attention!

@MauKruisheer
Copy link
Author

Okay, great. Thanks for the quick feedback. I'll download it directly from Github, no problem. Which branch should I refer to?

@ParticularMiner
Copy link
Contributor

@MauKruisheer

The branch can be found at this link.

  1. Download the package files by, for example, clicking on the link "Download zip" under the "Code" button (or, if you use git, you may alternatively clone the entire repository into your local git),
  2. navigate to the folder/directory where the setup.py script file is and
  3. enter the following command at your command prompt:
pip install .

This should install string_grouper in the same location where your other python packages are.

Kindly let me know afterwards if this solves your problem.

Cheers!

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

2 participants