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

No module named 'idtxl.knn' #111

Open
djhavert opened this issue Apr 26, 2024 · 1 comment
Open

No module named 'idtxl.knn' #111

djhavert opened this issue Apr 26, 2024 · 1 comment

Comments

@djhavert
Copy link

djhavert commented Apr 26, 2024

Issue Description

Looking through commits, it seems sometime in the last several months a directory knn was added to the primary idtxl directory, but the setup.py script was not altered to reflect this.

Error Message

This results in the following error

File "/home/user/.local/lib/python3.10/site-packages/idtxl/estimators_python.py", line 6, in <module>
    from idtxl.knn.knn_finder_factory import get_knn_finder
ModuleNotFoundError: No module named 'idtxl.knn'

Possible Solution(s)

One possible fix for this is to add idtxl.knn to the package list in setup.py:

...
setup(
    name="idtxl",
    packages=["idtxl", "idtxl.knn"],
    include_package_data=True,
...

I've tried the above fix locally and it seems to solve the issue.

A more general solution and further details can be found in the following thread:
https://stackoverflow.com/questions/68047686/subfolder-in-python-package-not-visible-when-installed

@blexo
Copy link

blexo commented May 23, 2024

thanks @djhavert - I was going to report this as an issue... you actually reported it And fixed it.

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