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

[Installation] Failed to import spectral module #90

Open
juliandwain opened this issue Oct 22, 2021 · 9 comments
Open

[Installation] Failed to import spectral module #90

juliandwain opened this issue Oct 22, 2021 · 9 comments

Comments

@juliandwain
Copy link

Hi,

Thanks for this amazing library!
I installed the module using the command given in the README pip install jax-cfd[complete] to have access to all submodules.

When I try to import the spectral module via import jax_cfd.spectral as spectral I get the following error message:

import jax_cfd.spectral as spectral
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'jax_cfd.spectral'

Some more information about my system and the environment:

  • Python version: Python 3.9.7 (default, Sep 16 2021, 13:09:58)
  • JAX version: 0.2.21
  • JAX CFD version: 0.1.0
  • OS: Linux 5.10.16.3-microsoft-standard-WSL2

Is there any way that I can resolve this issue?

Thanks in advance!

@gideonite
Copy link
Contributor

Did you try this: pip install -U git+https://github.com/google/jax-cfd.git? I think that the spectral module is not in a released version (yet).

Hope this helps!

@juliandwain
Copy link
Author

I haven't tried it yet but I will do so and let you know, thanks for the reply!

@juliandwain
Copy link
Author

Hi @gideonite
I tried your command but still got the same error, that there is no module called jax_cfd.spectral.

@shoyer
Copy link
Member

shoyer commented Oct 29, 2021

You might need to try creating a new Python environment, e.g., with Conda?

This works for me in Google Colab:

! pip install -U git+https://github.com/google/jax-cfd.git
import jax_cfd.spectral as spectral

@juliandwain
Copy link
Author

Thanks @shoyer , this solved my problem!

@juliandwain
Copy link
Author

@shoyer is there a reason why the spectral module is only included if I install the package via

pip install -U git+https://github.com/google/jax-cfd.git

For me, it does still not work if I install it like proposed in the README. (although the above solution does work!)

@juliandwain juliandwain reopened this Dec 15, 2021
@gideonite
Copy link
Contributor

Yikes sorry for this very very long delay. Did you wind up finding a solution? It may be because the package on PyPI is out of date. @juliandwain

@juliandwain
Copy link
Author

Installing the package via

pip install -U git+https://github.com/google/jax-cfd.git

does work for me. I was just wondering if its possible to include in the PyPI release so that one does not have to install it via the git command.

@shoyer
Copy link
Member

shoyer commented Mar 31, 2022

We're going to issue a new release shortly after fixing the issues for the channel flow demo

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