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

Failed to build pomegranate #60

Closed
Har-vit opened this issue May 4, 2023 · 4 comments
Closed

Failed to build pomegranate #60

Har-vit opened this issue May 4, 2023 · 4 comments

Comments

@Har-vit
Copy link

Har-vit commented May 4, 2023

In discrete_node.py you import "DiscreteDistribution" and "ConditionalProbabilityTable" from pomegranate. But last pomegranate version has not these. Maybe it's a reason for my failure: "Failed to build pomegranate" during install your library. What do you think?

@Har-vit
Copy link
Author

Har-vit commented May 4, 2023

Additional info about my failure:

"Python recognizes 'pomegranate.distributions' as an importable package[^1],
but it is absent from setuptools' packages configuration.

This leads to an ambiguous overall configuration. If you want to distribute this
package, please make sure that 'pomegranate.distributions' is explicitly added
to the packages configuration field.

Alternatively, you can also rely on setuptools' discovery methods
(for example by using find_namespace_packages(...)/find_namespace:
instead of find_packages(...)/find:)."

What do I need to do?

@Roman223
Copy link
Collaborator

Roman223 commented May 6, 2023

Hello @Har-vit
Could you provide your traceback?

If the error occurs during library installation, it could be a version conflict. Have you tried to install bamt into venv?

Notes: we don't use setuptools, we use poetry, so packages to install are defined by toml file, section [tool.poetry.dependencies].

If it turns out, that feedback from pip will be uninformative:
Could you try to install pomegranate (0.14.8) manually? If an error appears again, provide traceback as well, please.

@Har-vit
Copy link
Author

Har-vit commented May 12, 2023

Sorry, I have no traceback. But I managed to install into venv this setup: python==3.9 and bamt==1.1.40

@Roman223
Copy link
Collaborator

Roman223 commented Jun 2, 2023

After a while we have faced the same issue.
In fact, full traceback has 2 errors and 2 corresponding reccomendations.

The first one related to pomegranate.distribuiton. It states:
"Python recognizes 'pomegranate.distributions' as an importable package[^1],
but it is absent from setuptools' packages configuration.

This leads to an ambiguous overall configuration. If you want to distribute this
package, please make sure that 'pomegranate.distributions' is explicitly added
to the packages configuration field.

Alternatively, you can also rely on setuptools' discovery methods
(for example by using find_namespace_packages(...)/find_namespace:
instead of find_packages(...)/find:)."

Actually we have found in pomegranate's whl:
packages=['pomegranate', 'pomegranate/distributions'].
However, this error is not a part of actuall issue.

The second one is about C++ installation. It states:

copying pomegranate\distributions\distributions.pyx -> build\lib.win-amd64-cpython-310\pomegranate\distributions
running build_ext
building 'pomegranate.BayesClassifier' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ BuildTools":https://visualstudio.microsoft.com/visual-cpp-build-tools/

After installation the issue was solved.

Note that we find the error from issues:
https://stackoverflow.com/questions/70377207/can-not-install-scikit-learn, which apparently has the same origin.

@Roman223 Roman223 closed this as completed Jun 2, 2023
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