DedalusProject / dedalus

A flexible framework for solving PDEs with modern spectral methods.

Home Page:http://dedalus-project.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issues with Testing After Upgrading to Dedalus v3: 'No module named 'dedalus.core.transposes'

qingpowuwu opened this issue · comments

Hello,

I recently followed the instructions in the Dedalus documentation to upgrade from Dedalus v2 to v3. Here are the steps I took:

Installed Dedalus v2 from conda-forge:

conda install -c conda-forge dedalus c-compiler cython "h5py=*=mpi*"

Upgraded to Dedalus v3:

conda uninstall --force dedalus
CC=mpicc pip3 install --no-cache --no-build-isolation http://github.com/dedalusproject/dedalus/zipball/master/

After activating the dedalus3 environment and running the test command (python3 -m dedalus test), I encountered several errors. The primary issue seems to be a ModuleNotFoundError related to dedalus.core.transposes. Here is a snippet of the error message:

________________________________________________ ERROR collecting dedalus/tests/test_transforms.py _________________________________________________
ImportError while importing test module '/home/dedalus/dedalus/tests/test_transforms.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
../../../anaconda3/envs/dedalus3/lib/python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
dedalus/tests/test_transforms.py:4: in <module>
    from dedalus.core import coords, distributor, basis, field, operators
dedalus/core/__init__.py:2: in <module>
    from . import distributor
dedalus/core/distributor.py:23: in <module>
    from .transposes import FFTWTranspose as TransposePlanner
E   ModuleNotFoundError: No module named 'dedalus.core.transposes'

In total, there were 22 errors during the test collection, all seeming to stem from similar issues. I've attached the complete error log for your reference.

Could you please assist me in resolving these errors? Any guidance or suggestions would be greatly appreciated.

Thank you for your time and assistance.

It looks like you may have a local dedalus clone that you are hitting when you run the tests, as per the error message, in /home/dedalus. You need to move out of this local repo to run the tests from the pip-installed module in your conda installation.