From e17747cfc7bb3acd4dee7b3ce7f3110e47e96470 Mon Sep 17 00:00:00 2001 From: Michael Hucka Date: Mon, 14 Apr 2025 19:57:37 -0700 Subject: [PATCH] Constrain pip to install NumPy < 2.0 The latest Cirq work with NumPy 2.0 and no longer constrains the NumPy version like it did before, but Unitary does not seem to work with NumPy 2, so we need to tell pip not to install it. --- .github/workflows/pythonpackage.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index e0a6c0c..ecf114a 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -42,6 +42,8 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip + echo 'numpy<2.0.0' > constraint.txt + export PIP_CONSTRAINT=constraint.txt python dev_tools/write-ci-requirements.py --relative-cirq-version=${{ matrix.cirq-version }} --all-extras pip install -r ci-requirements.txt pip install --no-deps -e .