From b7d2a85965d0bad3f81c59ad47935cb535574bda Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 18 Jul 2023 12:29:36 -0500 Subject: [PATCH 1/6] Investigate pycocotools build issues --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index c167af3458b..4d1da2c1da1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -84,6 +84,7 @@ datasets = [ "opencv-python>=4.4.0.46,<5", # pandas 1.1.3+ required for Python 3.9 wheels "pandas>=1.1.3,<3", + # pycocotools 2.0.4+ required to avoid use of deprecated setuptools fetch_build_eggs "pycocotools>=2.0.4,<3", # pyvista 0.29+ required for to avoid segfault during testing From 89078234382809b880d2f9a6f532f46642c19ba6 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 18 Jul 2023 13:01:22 -0500 Subject: [PATCH 2/6] older pycocotools does not build with newer cython --- pyproject.toml | 1 - requirements/min-cons.old | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4d1da2c1da1..c167af3458b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -84,7 +84,6 @@ datasets = [ "opencv-python>=4.4.0.46,<5", # pandas 1.1.3+ required for Python 3.9 wheels "pandas>=1.1.3,<3", - # pycocotools 2.0.4+ required to avoid use of deprecated setuptools fetch_build_eggs "pycocotools>=2.0.4,<3", # pyvista 0.29+ required for to avoid segfault during testing diff --git a/requirements/min-cons.old b/requirements/min-cons.old index 3f103ce1b58..adc07d57623 100644 --- a/requirements/min-cons.old +++ b/requirements/min-cons.old @@ -4,3 +4,5 @@ nbconvert<6 pooch<1.5 # https://github.com/jquast/wcwidth/issues/36 wcwidth!=0.2.1 +# https://github.com/microsoft/torchgeo/pull/1484 +cython<3 From 73be577159bc4f8bb30dedc84ee31721a48d7095 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 18 Jul 2023 13:05:45 -0500 Subject: [PATCH 3/6] Force install of older cython --- .github/workflows/tests.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 297d07b4858..6340c8e41a7 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -106,6 +106,7 @@ jobs: - name: Install pip dependencies if: steps.cache.outputs.cache-hit != 'true' run: | + pip install cython<3 pip install -r requirements/min-reqs.old -c requirements/min-cons.old pip list - name: Run pytest checks From 92a9b82bb335de85c484c776d1a495f8088c9f2a Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 18 Jul 2023 13:11:10 -0500 Subject: [PATCH 4/6] Escape shell redirection --- .github/workflows/tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 6340c8e41a7..3ebdda69428 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -106,7 +106,7 @@ jobs: - name: Install pip dependencies if: steps.cache.outputs.cache-hit != 'true' run: | - pip install cython<3 + pip install 'cython<3' pip install -r requirements/min-reqs.old -c requirements/min-cons.old pip list - name: Run pytest checks From 8a81479d444dc2081fc10ca91a52930c0c1403b8 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 18 Jul 2023 17:55:37 -0500 Subject: [PATCH 5/6] Require newer pycocotools --- .github/workflows/tests.yaml | 1 - pyproject.toml | 4 ++-- requirements/min-cons.old | 2 -- requirements/min-reqs.old | 2 +- 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 3ebdda69428..297d07b4858 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -106,7 +106,6 @@ jobs: - name: Install pip dependencies if: steps.cache.outputs.cache-hit != 'true' run: | - pip install 'cython<3' pip install -r requirements/min-reqs.old -c requirements/min-cons.old pip list - name: Run pytest checks diff --git a/pyproject.toml b/pyproject.toml index c167af3458b..5ea282fd46b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -84,8 +84,8 @@ datasets = [ "opencv-python>=4.4.0.46,<5", # pandas 1.1.3+ required for Python 3.9 wheels "pandas>=1.1.3,<3", - # pycocotools 2.0.4+ required to avoid use of deprecated setuptools fetch_build_eggs - "pycocotools>=2.0.4,<3", + # pycocotools 2.0.5+ required for cython 3+ support + "pycocotools>=2.0.5,<3", # pyvista 0.29+ required for to avoid segfault during testing "pyvista>=0.29,<0.41", # radiant-mlhub 0.3+ required for newer tqdm support required by lightning diff --git a/requirements/min-cons.old b/requirements/min-cons.old index adc07d57623..3f103ce1b58 100644 --- a/requirements/min-cons.old +++ b/requirements/min-cons.old @@ -4,5 +4,3 @@ nbconvert<6 pooch<1.5 # https://github.com/jquast/wcwidth/issues/36 wcwidth!=0.2.1 -# https://github.com/microsoft/torchgeo/pull/1484 -cython<3 diff --git a/requirements/min-reqs.old b/requirements/min-reqs.old index 18f0890b2de..4d3831379be 100644 --- a/requirements/min-reqs.old +++ b/requirements/min-reqs.old @@ -25,7 +25,7 @@ h5py==3.0.0 laspy==2.0.0 opencv-python==4.4.0.46 pandas==1.1.3 -pycocotools==2.0.4 +pycocotools==2.0.5 pyvista==0.29.0 radiant-mlhub==0.3.0 rarfile==4.0 From 7e4988bcc3fe220682ae87c72ff3fc087dc8953f Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 18 Jul 2023 17:56:19 -0500 Subject: [PATCH 6/6] Update conda env too --- environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index 1ffcbb950f0..797d8ce22d9 100644 --- a/environment.yml +++ b/environment.yml @@ -9,7 +9,7 @@ dependencies: - matplotlib>=3.3.3 - numpy>=1.19.3 - pip - - pycocotools>=2.0.4 + - pycocotools>=2.0.5 - pyproj>=3 - python>=3.9 - pytorch>=1.12