Skip to content

Install from source fails #1

@dlakaplan

Description

@dlakaplan

Following the instructions at:
https://github.com/numpy/numpy-user-dtypes/tree/main/quaddtype

Install from scratch:

conda create -n nptest2 python=3.13                                                                                            
conda activate nptest2	                                                                                                       
pip install "numpy @ git+https://github.com/numpy/numpy.git"                                                                   
python -c 'import numpy; print(numpy.__version__)'                                                                             
# returns                                                                                                                      
# 2.5.0.dev0+git20260109.f254f12                                                                                               
pip install pytest meson meson-python                                                                                          
git clone git@github.com:numpy/numpy-user-dtypes.git                                                                           
cd numpy-user-dtypes/quaddtype                                                                                                 
python -m pip install . -v --no-build-isolation                                                                                
# says:                                                                                                                        
# Successfully built numpy_quaddtype                                                                                           
# Installing collected packages: numpy_quaddtype               

But when I try to run the tests:

python -m pytest tests 
==================================================== test session starts ====================================================
platform darwin -- Python 3.13.11, pytest-9.0.2, pluggy-1.6.0
rootdir: /Users/kaplan/pythonpackages/numpy-user-dtypes/quaddtype
configfile: pyproject.toml
collected 0 items / 4 errors                                                                                                

========================================================== ERRORS ===========================================================
____________________________________________ ERROR collecting tests/test_dot.py _____________________________________________
ImportError while importing test module '/Users/kaplan/pythonpackages/numpy-user-dtypes/quaddtype/tests/test_dot.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
../../../miniforge3/envs/nptest2/lib/python3.13/importlib/__init__.py:88: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/test_dot.py:3: in <module>
    from utils import create_quad_array, assert_quad_equal, assert_quad_array_equal, arrays_equal_with_nan
tests/utils.py:1: in <module>
    from numpy_quaddtype import QuadPrecision, QuadPrecDType
numpy_quaddtype/__init__.py:3: in <module>
    from ._quaddtype_main import (
E   ModuleNotFoundError: No module named 'numpy_quaddtype._quaddtype_main'
___________________________________________ ERROR collecting tests/test_finfo.py ____________________________________________
ImportError while importing test module '/Users/kaplan/pythonpackages/numpy-user-dtypes/quaddtype/tests/test_finfo.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
../../../miniforge3/envs/nptest2/lib/python3.13/importlib/__init__.py:88: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/test_finfo.py:3: in <module>
    from utils import assert_quad_equal as assert_quad_close
tests/utils.py:1: in <module>
    from numpy_quaddtype import QuadPrecision, QuadPrecDType
numpy_quaddtype/__init__.py:3: in <module>
    from ._quaddtype_main import (
E   ModuleNotFoundError: No module named 'numpy_quaddtype._quaddtype_main'
_______________________________________ ERROR collecting tests/test_multithreading.py _______________________________________
ImportError while importing test module '/Users/kaplan/pythonpackages/numpy-user-dtypes/quaddtype/tests/test_multithreading.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
../../../miniforge3/envs/nptest2/lib/python3.13/importlib/__init__.py:88: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/test_multithreading.py:15: in <module>
    from numpy_quaddtype import *
numpy_quaddtype/__init__.py:3: in <module>
    from ._quaddtype_main import (
E   ModuleNotFoundError: No module named 'numpy_quaddtype._quaddtype_main'
_________________________________________ ERROR collecting tests/test_quaddtype.py __________________________________________
ImportError while importing test module '/Users/kaplan/pythonpackages/numpy-user-dtypes/quaddtype/tests/test_quaddtype.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
../../../miniforge3/envs/nptest2/lib/python3.13/importlib/__init__.py:88: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/test_quaddtype.py:6: in <module>
    from mpmath import mp
E   ModuleNotFoundError: No module named 'mpmath'
================================================== short test summary info ==================================================
ERROR tests/test_dot.py
ERROR tests/test_finfo.py
ERROR tests/test_multithreading.py
ERROR tests/test_quaddtype.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 4 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
===================================================== 4 errors in 0.77s =====================================================

I installed mpmath, but that did not solve it:

python -m pytest tests
==================================================== test session starts ====================================================
platform darwin -- Python 3.13.11, pytest-9.0.2, pluggy-1.6.0
rootdir: /Users/kaplan/pythonpackages/numpy-user-dtypes/quaddtype
configfile: pyproject.toml
collected 0 items / 4 errors                                                                                                

========================================================== ERRORS ===========================================================
____________________________________________ ERROR collecting tests/test_dot.py _____________________________________________
ImportError while importing test module '/Users/kaplan/pythonpackages/numpy-user-dtypes/quaddtype/tests/test_dot.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
../../../miniforge3/envs/nptest2/lib/python3.13/importlib/__init__.py:88: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/test_dot.py:3: in <module>
    from utils import create_quad_array, assert_quad_equal, assert_quad_array_equal, arrays_equal_with_nan
tests/utils.py:1: in <module>
    from numpy_quaddtype import QuadPrecision, QuadPrecDType
numpy_quaddtype/__init__.py:3: in <module>
    from ._quaddtype_main import (
E   ModuleNotFoundError: No module named 'numpy_quaddtype._quaddtype_main'
___________________________________________ ERROR collecting tests/test_finfo.py ____________________________________________
ImportError while importing test module '/Users/kaplan/pythonpackages/numpy-user-dtypes/quaddtype/tests/test_finfo.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
../../../miniforge3/envs/nptest2/lib/python3.13/importlib/__init__.py:88: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/test_finfo.py:3: in <module>
    from utils import assert_quad_equal as assert_quad_close
tests/utils.py:1: in <module>
    from numpy_quaddtype import QuadPrecision, QuadPrecDType
numpy_quaddtype/__init__.py:3: in <module>
    from ._quaddtype_main import (
E   ModuleNotFoundError: No module named 'numpy_quaddtype._quaddtype_main'
_______________________________________ ERROR collecting tests/test_multithreading.py _______________________________________
ImportError while importing test module '/Users/kaplan/pythonpackages/numpy-user-dtypes/quaddtype/tests/test_multithreading.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
../../../miniforge3/envs/nptest2/lib/python3.13/importlib/__init__.py:88: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/test_multithreading.py:15: in <module>
    from numpy_quaddtype import *
numpy_quaddtype/__init__.py:3: in <module>
    from ._quaddtype_main import (
E   ModuleNotFoundError: No module named 'numpy_quaddtype._quaddtype_main'
_________________________________________ ERROR collecting tests/test_quaddtype.py __________________________________________
ImportError while importing test module '/Users/kaplan/pythonpackages/numpy-user-dtypes/quaddtype/tests/test_quaddtype.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
../../../miniforge3/envs/nptest2/lib/python3.13/importlib/__init__.py:88: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/test_quaddtype.py:8: in <module>
    import numpy_quaddtype
numpy_quaddtype/__init__.py:3: in <module>
    from ._quaddtype_main import (
E   ModuleNotFoundError: No module named 'numpy_quaddtype._quaddtype_main'
================================================== short test summary info ==================================================
ERROR tests/test_dot.py
ERROR tests/test_finfo.py
ERROR tests/test_multithreading.py
ERROR tests/test_quaddtype.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 4 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
===================================================== 4 errors in 0.39s =====================================================

Apologies if I'm being dense. I had gotten this to work previously but was trying to update it for the latest improvements. However, I didn't keep very detailed notes so I may have missed a step.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions