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

Edward2 backend #574

Open
hussienalbared opened this issue Sep 20, 2023 · 3 comments
Open

Edward2 backend #574

hussienalbared opened this issue Sep 20, 2023 · 3 comments

Comments

@hussienalbared
Copy link

I am facing this issue although both tensorflow and numpy are installed

raise ImportError("No backend is available for Edward2. Please install "
ImportError: No backend is available for Edward2. Please install dependencies for JAX, NumPy, or TensorFlow.

numpy 1.23.5
scipy 1.11.2
tb-nightly 2.15.0a20230919
tensorboard 2.14.0
tensorflow 2.14.0rc1
tensorflow-probability 0.21.0
termcolor 2.3.0
tf-estimator-nightly 2.14.0.dev2023080308
tf-nightly 2.15.0.dev20230920

@arthur-thuy
Copy link

I'm encountering the same issue, but only when installing the latest development version of edward2 (version 0.0.3) with:

pip install "git+https://github.com/google/edward2.git#egg=edward2"

When I install the 0.0.2 version with pypi (pip install edward2), it finds the backend. However, I get a different error related to scipy which was fixed in commit d23eddd (after the release of 0.0.2).

@arthur-thuy
Copy link

arthur-thuy commented Nov 22, 2023

For version 0.0.2, closed issue #566 proposes to use pip install scipy==1.7.3. This works for me.

Obviously, this doesn't change anything for the backend problem with 0.0.3.

@phanav
Copy link

phanav commented Mar 29, 2024

The cause was a missing package for me (tenacity).

I found out by editing this file in the installation path:

/miniconda3/envs/tf2/lib/python3.10/site-packages/edward2/__init__.py
Then, catch and print the exception.

try:
  from edward2 import jax
  __all__ += ["jax"]
except (ImportError, AttributeError) as exc:
  # We also catch AttributeError. JAX can raise AttributeError during
  # imports in colab unless JAX is directly installed first.
  print(exc)
  warnings.warn("JAX backend for Edward2 is not available.")

(No module named tenacity)

Finally, install the missing package.

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

3 participants