ImportError: SolverGeneric1ND
francispoulin opened this issue · comments
Hello Mikael,
I hope you are well.
After not using shenfun for a while I picked it picked it up today and see you've done some really interesting things, like including some demos in polar coordinates. They look great!
Unfortunately, when I try the new code, for example unitdisk_helmholtz.py, I get a problem with importing Solvergeneric1ND.
I did a conda update and thought that would help but it didn't. Do you recommend that I do a fresh install and that should add it? Or is there an additional step that I need to do?
Thanks in advance,
Francis
Hi Francis
Did you run conda update shenfun? I think you should first update the environment: conda update conda, and then try to update shenfun. Probably best to create a new environment.
Thanks. I hadn't tried the conda update conda but now I have, on two computers, followed by a conda update shenfun and they both still give me this error.
$ python unitdisc_helmholtz.py
Traceback (most recent call last):
File "unitdisc_helmholtz.py", line 15, in <module>
from shenfun.la import SolverGeneric1ND
ImportError: cannot import name 'SolverGeneric1ND' from 'shenfun.la'
(/home/fpoulin/software/anaconda3/envs/shenfun/lib/python3.8/site-packages/shenfun/la.py)
So I will create a new environment and see if that does the trick. Before I do so is there a way to figure out exactly what command I used to create that environment?
I tried using the same command I used before, luckily I kept notes, and for some reason it no longer works. The result is copied below.
$ conda create --name shenfun -c conda-forge shenfun mpich matplotlib sympy pytest scipy coverage h5py=*=mpi*
netcdf4=*=mpi*
Collecting package metadata (current_repodata.json): done
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed
PackagesNotFoundError: The following packages are not available from current channels:
- coverage h5py[build=mpi*]
Current channels:
- https://conda.anaconda.org/conda-forge/linux-64
- https://conda.anaconda.org/conda-forge/noarch
- https://repo.anaconda.com/pkgs/main/linux-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/linux-64
- https://repo.anaconda.com/pkgs/r/noarch
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
)
Okay, I am happy to say that the problem has been resolved. It would appear that before I needed to, and could, add the h5py and netcdf4 stuff, whereas now it complains. When I do the following I am happy to say that the new stuff in polar coordiantes do run and I can also run them in parallel. Thanks!
conda create --name shenfun -c conda-forge shenfun mpich matplotlib sympy pytest scipy coverage numba