jax-cfd
jax-cfd copied to clipboard
[Installation] Failed to import spectral module
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!
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!
I haven't tried it yet but I will do so and let you know, thanks for the reply!
Hi @gideonite
I tried your command but still got the same error, that there is no module called jax_cfd.spectral
.
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
Thanks @shoyer , this solved my problem!
@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!)
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
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.
We're going to issue a new release shortly after fixing the issues for the channel flow demo