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

Test failures with numpy 2.2 #169

Open
manivmtc opened this issue Dec 16, 2024 · 1 comment
Open

Test failures with numpy 2.2 #169

manivmtc opened this issue Dec 16, 2024 · 1 comment
Assignees

Comments

@manivmtc
Copy link

Bug

Tests fail due to numpy version specific imports

_________ ERROR collecting tests/utils/structures/test_key_line_2d.py __________  
ImportError while importing test module '/home/DGP/dgp/tests/utils/structures/test_key_line_2d.py'.  
Hint: make sure your test modules/packages have valid Python names.  
Traceback:  
../../../../miniconda3/envs/envDGP/lib/python3.10/importlib/__init__.py:126: in import_module  
    return _bootstrap._gcd_import(name[level:], package, level)  
tests/utils/structures/test_key_line_2d.py:3: in <module>  
    from numpy.lib.ufunclike import fix  
E   ModuleNotFoundError: No module named 'numpy.lib.ufunclike'

Same issue with dgp/tests/utils/structures/test_key_line_3d.py and dgp/tests/utils/test_camera.py

To Reproduce

Steps to reproduce the behavior:

  1. Install numpy version 2.2

Minimum reproducible code example:
Just create a virtual environment using pyenv or conda. Activate it and then try this on the command-line
make test
Also, you can do
python -c "import numpy; print(numpy.__version__); from numpy.lib import ufunclike"

Expected behavior

If the problem is corrected, the tests should pass. The imports should no longer fail

Additional context

RHEL machine, so cannot install numpy 1.20.3 using pip for some weird gcc compatibility reasons

@YoungseokOh
Copy link

install numpy 1.23

_dgp 1.0 requires numpy>=1.20.3, but you have numpy 1.20.0 which is incompatible.
contourpy 1.3.0 requires numpy>=1.23, but you have numpy 1.20.0 which is incompatible.
matplotlib 3.8.4 requires numpy>=1.21, but you have numpy 1.20.0 which is incompatible.
pandas 2.2.3 requires numpy>=1.22.4; python_version < "3.11", but you have numpy 1.20.0 which is incompatible.
xarray 2024.7.0 requires numpy>=1.23, but you have numpy 1.20.0 which is incompatible._

numpy 1.20.3 is incompatible.

so, it works well for the test.

pip install numpy==1.23

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

8 participants