From e4838892bf8dcd220e623be66edfcef683f0e638 Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Mon, 20 Nov 2023 14:15:05 -0500 Subject: [PATCH] FIX: NumPy 2.0 breaks everything --- pyproject.toml | 2 +- tools/azure_dependencies.sh | 8 +++++--- tools/github_actions_dependencies.sh | 8 +++++--- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 3db07d5d3c5..8c172fcac70 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -133,7 +133,7 @@ test_extra = [ doc = [ "sphinx>=6", "numpydoc", - "pydata_sphinx_theme==0.14.3", + "pydata_sphinx_theme==0.13.3", "sphinx-gallery", "sphinxcontrib-bibtex>=2.5", "memory_profiler", diff --git a/tools/azure_dependencies.sh b/tools/azure_dependencies.sh index 371a61b60e3..d27c10d8224 100755 --- a/tools/azure_dependencies.sh +++ b/tools/azure_dependencies.sh @@ -8,15 +8,17 @@ elif [ "${TEST_MODE}" == "pip-pre" ]; then STD_ARGS="$STD_ARGS --pre" python -m pip install $STD_ARGS --only-binary ":all:" --extra-index-url "https://www.riverbankcomputing.com/pypi/simple" PyQt6 PyQt6-sip PyQt6-Qt6 echo "Numpy etc." - # As of 2023/10/25 no pandas (or statsmodels) because they pin to NumPy < 2 - python -m pip install $STD_ARGS --only-binary ":all:" --extra-index-url "https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" "numpy>=2.0.0.dev0" "scipy>=1.12.0.dev0" scikit-learn matplotlib + # See github_actions_dependencies.sh for comments + python -m pip install $STD_ARGS --only-binary "numpy" numpy + python -m pip install $STD_ARGS --only-binary ":all:" --extra-index-url "https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" "scipy>=1.12.0.dev0" scikit-learn matplotlib pandas statsmodels echo "dipy" python -m pip install $STD_ARGS --only-binary ":all:" --extra-index-url "https://pypi.anaconda.org/scipy-wheels-nightly/simple" dipy echo "h5py" python -m pip install $STD_ARGS --only-binary ":all:" -f "https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83.ssl.cf2.rackcdn.com" h5py echo "vtk" python -m pip install $STD_ARGS --only-binary ":all:" --extra-index-url "https://wheels.vtk.org" vtk - echo "openmeeg" + echo "nilearn and openmeeg" + python -m pip install $STD_ARGS git+https://github.com/nilearn/nilearn python -m pip install $STD_ARGS --only-binary ":all:" --extra-index-url "https://test.pypi.org/simple" openmeeg echo "pyvista/pyvistaqt" python -m pip install --progress-bar off git+https://github.com/pyvista/pyvista diff --git a/tools/github_actions_dependencies.sh b/tools/github_actions_dependencies.sh index 768165635a4..2a4b90bb910 100755 --- a/tools/github_actions_dependencies.sh +++ b/tools/github_actions_dependencies.sh @@ -24,8 +24,10 @@ else echo "PyQt6" pip install $STD_ARGS --only-binary ":all:" --default-timeout=60 --extra-index-url https://www.riverbankcomputing.com/pypi/simple PyQt6 echo "NumPy/SciPy/pandas etc." - # As of 2023/10/25 no pandas (or statsmodels, nilearn) because they pin to NumPy < 2 - pip install $STD_ARGS --only-binary ":all:" --default-timeout=60 --extra-index-url "https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" "numpy>=2.0.0.dev0" scipy scikit-learn matplotlib pillow + # As of 2023/11/20 no NumPy 2.0 because it requires everything using its ABI to + # compile against 2.0, and h5py isn't (and probably not VTK either) + pip install $STD_ARGS --only-binary "numpy" --default-timeout=60 numpy + pip install $STD_ARGS --only-binary ":all:" --default-timeout=60 --extra-index-url "https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" scipy scikit-learn matplotlib pillow pandas statsmodels echo "dipy" pip install $STD_ARGS --only-binary ":all:" --default-timeout=60 --extra-index-url "https://pypi.anaconda.org/scipy-wheels-nightly/simple" dipy echo "H5py" @@ -34,7 +36,7 @@ else pip install $STD_ARGS --only-binary ":all:" --extra-index-url "https://test.pypi.org/simple" openmeeg # No Numba because it forces an old NumPy version echo "nilearn and openmeeg" - # pip install $STD_ARGS git+https://github.com/nilearn/nilearn + pip install $STD_ARGS git+https://github.com/nilearn/nilearn pip install $STD_ARGS openmeeg echo "VTK" pip install $STD_ARGS --only-binary ":all:" --extra-index-url "https://wheels.vtk.org" vtk