From 4669f8941afc81ba5126831faa92b87e2524b135 Mon Sep 17 00:00:00 2001 From: blnicho Date: Fri, 12 Dec 2025 12:09:11 -0700 Subject: [PATCH 01/34] Add stricter pin on platformdirs in GHA win jobs --- .github/workflows/test_branches.yml | 5 +++-- .github/workflows/test_pr_and_main.yml | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test_branches.yml b/.github/workflows/test_branches.yml index e5af7e5cbe5..dcbc31cf9c1 100644 --- a/.github/workflows/test_branches.yml +++ b/.github/workflows/test_branches.yml @@ -376,9 +376,10 @@ jobs: echo "*** Install Pyomo dependencies ***" # For windows, cannot use newer setuptools because of APPSI compilation issues # There seems to be some specific problem with platformdirs 4.5.0 - # on win 3.13/3.14 as of 2025-10-23 + # on win 3.13/3.14 as of 2025-10-23 and platformdirs 4.5.1 on win/3.13 + # as of 2025-12-12 if test "${{matrix.TARGET}}" == 'win'; then - CONDA_DEPENDENCIES="$CONDA_DEPENDENCIES setuptools<74.0.0 platformdirs!=4.5.0" + CONDA_DEPENDENCIES="$CONDA_DEPENDENCIES setuptools<74.0.0 platformdirs<4.5.0" fi # Note: this will fail the build if any installation fails (or # possibly if it outputs messages to stderr) diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml index 62814d904fa..675ea7326e0 100644 --- a/.github/workflows/test_pr_and_main.yml +++ b/.github/workflows/test_pr_and_main.yml @@ -429,9 +429,10 @@ jobs: echo "*** Install Pyomo dependencies ***" # For windows, cannot use newer setuptools because of APPSI compilation issues # There seems to be some specific problem with platformdirs 4.5.0 - # on win 3.13/3.14 as of 2025-10-23 + # on win 3.13/3.14 as of 2025-10-23 and platformdirs 4.5.1 on win/3.13 + # as of 2025-12-12 if test "${{matrix.TARGET}}" == 'win'; then - CONDA_DEPENDENCIES="$CONDA_DEPENDENCIES setuptools<74.0.0 platformdirs!=4.5.0" + CONDA_DEPENDENCIES="$CONDA_DEPENDENCIES setuptools<74.0.0 platformdirs<4.5.0" fi # Note: this will fail the build if any installation fails (or # possibly if it outputs messages to stderr) From 3bc1db9486665293420e729654e27a6ff9b96937 Mon Sep 17 00:00:00 2001 From: blnicho Date: Fri, 12 Dec 2025 14:52:45 -0700 Subject: [PATCH 02/34] Exclude specific platformdirs versions instead of setting upper bound --- .github/workflows/test_branches.yml | 2 +- .github/workflows/test_pr_and_main.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_branches.yml b/.github/workflows/test_branches.yml index dcbc31cf9c1..d094bcb61bd 100644 --- a/.github/workflows/test_branches.yml +++ b/.github/workflows/test_branches.yml @@ -379,7 +379,7 @@ jobs: # on win 3.13/3.14 as of 2025-10-23 and platformdirs 4.5.1 on win/3.13 # as of 2025-12-12 if test "${{matrix.TARGET}}" == 'win'; then - CONDA_DEPENDENCIES="$CONDA_DEPENDENCIES setuptools<74.0.0 platformdirs<4.5.0" + CONDA_DEPENDENCIES="$CONDA_DEPENDENCIES setuptools<74.0.0 platformdirs!=4.5.0,!=4.5.1" fi # Note: this will fail the build if any installation fails (or # possibly if it outputs messages to stderr) diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml index 675ea7326e0..f25b847758a 100644 --- a/.github/workflows/test_pr_and_main.yml +++ b/.github/workflows/test_pr_and_main.yml @@ -432,7 +432,7 @@ jobs: # on win 3.13/3.14 as of 2025-10-23 and platformdirs 4.5.1 on win/3.13 # as of 2025-12-12 if test "${{matrix.TARGET}}" == 'win'; then - CONDA_DEPENDENCIES="$CONDA_DEPENDENCIES setuptools<74.0.0 platformdirs<4.5.0" + CONDA_DEPENDENCIES="$CONDA_DEPENDENCIES setuptools<74.0.0 platformdirs!=4.5.0,!=4.5.1" fi # Note: this will fail the build if any installation fails (or # possibly if it outputs messages to stderr) From c7129091bfe234c9b2aeb13c1042a64beb8965a3 Mon Sep 17 00:00:00 2001 From: John Siirola Date: Mon, 22 Dec 2025 11:39:12 -0700 Subject: [PATCH 03/34] Relax tolerances due to upstream changes --- pyomo/contrib/piecewise/tests/test_nonlinear_to_pwl.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pyomo/contrib/piecewise/tests/test_nonlinear_to_pwl.py b/pyomo/contrib/piecewise/tests/test_nonlinear_to_pwl.py index 48c36c017fb..491ba2f4069 100644 --- a/pyomo/contrib/piecewise/tests/test_nonlinear_to_pwl.py +++ b/pyomo/contrib/piecewise/tests/test_nonlinear_to_pwl.py @@ -602,7 +602,7 @@ def test_linear_model_tree_uniform(self): # pretty close to m.x, but we're a bit off because we don't have 0 # as a breakpoint. 0.9833360108369479 * m.x + 0.16663989163052034, - places=7, + places=6, ) def test_linear_model_tree_random(self): @@ -657,7 +657,7 @@ def test_linear_model_tree_random_auto_depth_tree(self): pwlf._simplices, [(0, 1), (1, 2), (2, 3), (3, 4), (4, 5), (5, 6), (6, 7), (7, 8)], ) - self.assertEqual( + self.assertStructuredAlmostEqual( pwlf._points, [ (-10,), @@ -670,6 +670,7 @@ def test_linear_model_tree_random_auto_depth_tree(self): (2.15597,), (10,), ], + places=4, ) self.assertEqual(len(pwlf._linear_functions), 8) for i in range(3): @@ -680,7 +681,7 @@ def test_linear_model_tree_random_auto_depth_tree(self): # pretty close to - m.x, but we're a bit off because we don't have 0 # as a breakpoint. -0.9851979299618323 * m.x + 0.12006477080409184, - places=7, + places=6, ) for i in range(4, 8): assertExpressionsEqual(self, pwlf._linear_functions[i](m.x), m.x) From c244119cc8aefc10bf3a558ff7acec4667a7efa6 Mon Sep 17 00:00:00 2001 From: blnicho Date: Mon, 5 Jan 2026 17:50:51 -0700 Subject: [PATCH 04/34] Removing Python 3.14 pin and excluding pip version in win conda build --- .github/workflows/test_branches.yml | 5 +++-- .github/workflows/test_pr_and_main.yml | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test_branches.yml b/.github/workflows/test_branches.yml index d094bcb61bd..99b69af738e 100644 --- a/.github/workflows/test_branches.yml +++ b/.github/workflows/test_branches.yml @@ -377,9 +377,10 @@ jobs: # For windows, cannot use newer setuptools because of APPSI compilation issues # There seems to be some specific problem with platformdirs 4.5.0 # on win 3.13/3.14 as of 2025-10-23 and platformdirs 4.5.1 on win/3.13 - # as of 2025-12-12 + # as of 2025-12-12, pip 25.3 now packages the problematic platformdirs + # version so excluding that also. if test "${{matrix.TARGET}}" == 'win'; then - CONDA_DEPENDENCIES="$CONDA_DEPENDENCIES setuptools<74.0.0 platformdirs!=4.5.0,!=4.5.1" + CONDA_DEPENDENCIES="$CONDA_DEPENDENCIES setuptools<74.0.0 platformdirs!=4.5.0,!=4.5.1 pip!=25.3" fi # Note: this will fail the build if any installation fails (or # possibly if it outputs messages to stderr) diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml index f25b847758a..aa4c306f570 100644 --- a/.github/workflows/test_pr_and_main.yml +++ b/.github/workflows/test_pr_and_main.yml @@ -93,8 +93,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] - # FIXME: pinning to 3.14.0 until 3.14.1 is removed from runner tool cache - python: [ '3.10', 3.11, 3.12, 3.13, 3.14.0 ] + python: [ '3.10', 3.11, 3.12, 3.13, 3.14 ] other: [""] category: [""] @@ -430,9 +429,10 @@ jobs: # For windows, cannot use newer setuptools because of APPSI compilation issues # There seems to be some specific problem with platformdirs 4.5.0 # on win 3.13/3.14 as of 2025-10-23 and platformdirs 4.5.1 on win/3.13 - # as of 2025-12-12 + # as of 2025-12-12. pip 25.3 now packages the problematic platformdirs + # version so excluding that also. if test "${{matrix.TARGET}}" == 'win'; then - CONDA_DEPENDENCIES="$CONDA_DEPENDENCIES setuptools<74.0.0 platformdirs!=4.5.0,!=4.5.1" + CONDA_DEPENDENCIES="$CONDA_DEPENDENCIES setuptools<74.0.0 platformdirs!=4.5.0,!=4.5.1 pip!=25.3" fi # Note: this will fail the build if any installation fails (or # possibly if it outputs messages to stderr) From 0a1d2062e15f1a13101a897eda464f2ddeff6ffd Mon Sep 17 00:00:00 2001 From: blnicho Date: Mon, 5 Jan 2026 18:00:42 -0700 Subject: [PATCH 05/34] New typos version complains about 'bimap' --- .github/workflows/typos.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/typos.toml b/.github/workflows/typos.toml index c58806ff71e..76bfe276dec 100644 --- a/.github/workflows/typos.toml +++ b/.github/workflows/typos.toml @@ -65,6 +65,8 @@ MCH = "MCH" # Ignore RO ro = "ro" RO = "RO" +# Ignore bimap +bimap = "bimap" # Ignore EOF - end of file EOF = "EOF" # Ignore lst as shorthand for list From ea598d834aaa3c142b56dbc5e2f23610452e6146 Mon Sep 17 00:00:00 2001 From: blnicho Date: Mon, 5 Jan 2026 18:24:52 -0700 Subject: [PATCH 06/34] Debugging: checking pip version --- .github/workflows/test_branches.yml | 1 + .github/workflows/test_pr_and_main.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/test_branches.yml b/.github/workflows/test_branches.yml index 99b69af738e..d5962df02e0 100644 --- a/.github/workflows/test_branches.yml +++ b/.github/workflows/test_branches.yml @@ -455,6 +455,7 @@ jobs: echo "" echo "Installing packages only available on PyPI" if test -n "$PYPI_DEPENDENCIES"; then + python -m pip --version python -m pip install --cache-dir cache/pip $PYPI_DEPENDENCIES fi # remember this python interpreter diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml index aa4c306f570..2e5c3d2a0c4 100644 --- a/.github/workflows/test_pr_and_main.yml +++ b/.github/workflows/test_pr_and_main.yml @@ -507,6 +507,7 @@ jobs: echo "" echo "Installing packages only available on PyPI" if test -n "$PYPI_DEPENDENCIES"; then + python -m pip --version python -m pip install --cache-dir cache/pip $PYPI_DEPENDENCIES fi # remember this python interpreter From e025fbdc9ab386b1112c53703ff9795b4a56176e Mon Sep 17 00:00:00 2001 From: blnicho Date: Mon, 5 Jan 2026 18:49:42 -0700 Subject: [PATCH 07/34] Debugging: checking pip and platformdirs --- .github/workflows/test_branches.yml | 3 ++- .github/workflows/test_pr_and_main.yml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_branches.yml b/.github/workflows/test_branches.yml index d5962df02e0..1efbb894c2f 100644 --- a/.github/workflows/test_branches.yml +++ b/.github/workflows/test_branches.yml @@ -455,7 +455,8 @@ jobs: echo "" echo "Installing packages only available on PyPI" if test -n "$PYPI_DEPENDENCIES"; then - python -m pip --version + python -c "import pip; print(pip.__version__, pip.__file__)" + python -c "import platformdirs; print(platformdirs.__version__, platformdirs.__file__)" python -m pip install --cache-dir cache/pip $PYPI_DEPENDENCIES fi # remember this python interpreter diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml index 2e5c3d2a0c4..f291ba65101 100644 --- a/.github/workflows/test_pr_and_main.yml +++ b/.github/workflows/test_pr_and_main.yml @@ -507,7 +507,8 @@ jobs: echo "" echo "Installing packages only available on PyPI" if test -n "$PYPI_DEPENDENCIES"; then - python -m pip --version + python -c "import pip; print(pip.__version__, pip.__file__)" + python -c "import platformdirs; print(platformdirs.__version__, platformdirs.__file__)" python -m pip install --cache-dir cache/pip $PYPI_DEPENDENCIES fi # remember this python interpreter From 151d65ee91191fc781edea0e5a6375eeb28fdf55 Mon Sep 17 00:00:00 2001 From: Bethany Nicholson Date: Tue, 6 Jan 2026 08:39:06 -0500 Subject: [PATCH 08/34] Debugging: set upper bound on pip --- .github/workflows/test_branches.yml | 2 +- .github/workflows/test_pr_and_main.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_branches.yml b/.github/workflows/test_branches.yml index 1efbb894c2f..2940edfc70c 100644 --- a/.github/workflows/test_branches.yml +++ b/.github/workflows/test_branches.yml @@ -380,7 +380,7 @@ jobs: # as of 2025-12-12, pip 25.3 now packages the problematic platformdirs # version so excluding that also. if test "${{matrix.TARGET}}" == 'win'; then - CONDA_DEPENDENCIES="$CONDA_DEPENDENCIES setuptools<74.0.0 platformdirs!=4.5.0,!=4.5.1 pip!=25.3" + CONDA_DEPENDENCIES="$CONDA_DEPENDENCIES setuptools<74.0.0 platformdirs!=4.5.0,!=4.5.1 pip<25.0" fi # Note: this will fail the build if any installation fails (or # possibly if it outputs messages to stderr) diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml index f291ba65101..d58caca91d4 100644 --- a/.github/workflows/test_pr_and_main.yml +++ b/.github/workflows/test_pr_and_main.yml @@ -432,7 +432,7 @@ jobs: # as of 2025-12-12. pip 25.3 now packages the problematic platformdirs # version so excluding that also. if test "${{matrix.TARGET}}" == 'win'; then - CONDA_DEPENDENCIES="$CONDA_DEPENDENCIES setuptools<74.0.0 platformdirs!=4.5.0,!=4.5.1 pip!=25.3" + CONDA_DEPENDENCIES="$CONDA_DEPENDENCIES setuptools<74.0.0 platformdirs!=4.5.0,!=4.5.1 pip<25.0" fi # Note: this will fail the build if any installation fails (or # possibly if it outputs messages to stderr) From f2820486f162519dbf93e8c21892381ead8fd008 Mon Sep 17 00:00:00 2001 From: John Siirola Date: Tue, 6 Jan 2026 10:12:03 -0700 Subject: [PATCH 09/34] Adding addional debugging --- .github/workflows/test_pr_and_main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml index d58caca91d4..f3c2c69e1e6 100644 --- a/.github/workflows/test_pr_and_main.yml +++ b/.github/workflows/test_pr_and_main.yml @@ -508,6 +508,7 @@ jobs: echo "Installing packages only available on PyPI" if test -n "$PYPI_DEPENDENCIES"; then python -c "import pip; print(pip.__version__, pip.__file__)" + python -c "from pip._vendor import platformdirs; print(platformdirs.__version__, platformdirs.__file__)" python -c "import platformdirs; print(platformdirs.__version__, platformdirs.__file__)" python -m pip install --cache-dir cache/pip $PYPI_DEPENDENCIES fi From 461d326ce1b12d2134bfb10bb838c7ab79cc0b12 Mon Sep 17 00:00:00 2001 From: John Siirola Date: Tue, 6 Jan 2026 10:53:54 -0700 Subject: [PATCH 10/34] More debugging --- .github/workflows/test_pr_and_main.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml index f3c2c69e1e6..ebe3ff67b56 100644 --- a/.github/workflows/test_pr_and_main.yml +++ b/.github/workflows/test_pr_and_main.yml @@ -507,6 +507,9 @@ jobs: echo "" echo "Installing packages only available on PyPI" if test -n "$PYPI_DEPENDENCIES"; then + python -c "import ctypes; print(ctypes.__path__)" + python -c "import ctypes.windll" + find `python -c "import os.path, ctypes; print(os.path.dirname(ctypes.__path__))"` python -c "import pip; print(pip.__version__, pip.__file__)" python -c "from pip._vendor import platformdirs; print(platformdirs.__version__, platformdirs.__file__)" python -c "import platformdirs; print(platformdirs.__version__, platformdirs.__file__)" From 9207610f3be40c754691228294a040969c2e27f4 Mon Sep 17 00:00:00 2001 From: John Siirola Date: Tue, 6 Jan 2026 11:50:39 -0700 Subject: [PATCH 11/34] More debugging --- .github/workflows/test_pr_and_main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml index ebe3ff67b56..ef087302027 100644 --- a/.github/workflows/test_pr_and_main.yml +++ b/.github/workflows/test_pr_and_main.yml @@ -506,10 +506,10 @@ jobs: # Re-try Pyomo (optional) dependencies with pip echo "" echo "Installing packages only available on PyPI" + conda install -q -y --force-reinstall libffi if test -n "$PYPI_DEPENDENCIES"; then + find `python -c "import os, os.path; print(os.path.dirname(os.__path__))"` -name \*conda_trash python -c "import ctypes; print(ctypes.__path__)" - python -c "import ctypes.windll" - find `python -c "import os.path, ctypes; print(os.path.dirname(ctypes.__path__))"` python -c "import pip; print(pip.__version__, pip.__file__)" python -c "from pip._vendor import platformdirs; print(platformdirs.__version__, platformdirs.__file__)" python -c "import platformdirs; print(platformdirs.__version__, platformdirs.__file__)" From 1a5fb2f93da25dc892c359994244c7dfcfb79e28 Mon Sep 17 00:00:00 2001 From: John Siirola Date: Tue, 6 Jan 2026 12:12:56 -0700 Subject: [PATCH 12/34] Fix debugging --- .github/workflows/test_pr_and_main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml index ef087302027..b270dc5a61b 100644 --- a/.github/workflows/test_pr_and_main.yml +++ b/.github/workflows/test_pr_and_main.yml @@ -509,7 +509,7 @@ jobs: conda install -q -y --force-reinstall libffi if test -n "$PYPI_DEPENDENCIES"; then find `python -c "import os, os.path; print(os.path.dirname(os.__path__))"` -name \*conda_trash - python -c "import ctypes; print(ctypes.__path__)" + python -c "import ctypes; print(ctypes.__file__)" python -c "import pip; print(pip.__version__, pip.__file__)" python -c "from pip._vendor import platformdirs; print(platformdirs.__version__, platformdirs.__file__)" python -c "import platformdirs; print(platformdirs.__version__, platformdirs.__file__)" From 0479e8f0c0c682ee56198f704543220d839451d0 Mon Sep 17 00:00:00 2001 From: John Siirola Date: Tue, 6 Jan 2026 12:33:03 -0700 Subject: [PATCH 13/34] Debug: fix path query --- .github/workflows/test_pr_and_main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml index b270dc5a61b..a0dd9d714e6 100644 --- a/.github/workflows/test_pr_and_main.yml +++ b/.github/workflows/test_pr_and_main.yml @@ -508,7 +508,7 @@ jobs: echo "Installing packages only available on PyPI" conda install -q -y --force-reinstall libffi if test -n "$PYPI_DEPENDENCIES"; then - find `python -c "import os, os.path; print(os.path.dirname(os.__path__))"` -name \*conda_trash + find `python -c "import os, os.path; print(os.path.dirname(os.__file__))"` -name \*conda_trash python -c "import ctypes; print(ctypes.__file__)" python -c "import pip; print(pip.__version__, pip.__file__)" python -c "from pip._vendor import platformdirs; print(platformdirs.__version__, platformdirs.__file__)" From 0a9003cba3ca55a40ad86a026b75cfc4c6a4be29 Mon Sep 17 00:00:00 2001 From: John Siirola Date: Tue, 6 Jan 2026 13:25:30 -0700 Subject: [PATCH 14/34] Debug: force reinstall python and libffi --- .github/workflows/test_pr_and_main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml index a0dd9d714e6..c79050b07b4 100644 --- a/.github/workflows/test_pr_and_main.yml +++ b/.github/workflows/test_pr_and_main.yml @@ -506,7 +506,7 @@ jobs: # Re-try Pyomo (optional) dependencies with pip echo "" echo "Installing packages only available on PyPI" - conda install -q -y --force-reinstall libffi + conda install -q -y --force-reinstall libffi python if test -n "$PYPI_DEPENDENCIES"; then find `python -c "import os, os.path; print(os.path.dirname(os.__file__))"` -name \*conda_trash python -c "import ctypes; print(ctypes.__file__)" From 327e0b830bd4d43c8a078c7c9c52214c1e0b37b4 Mon Sep 17 00:00:00 2001 From: John Siirola Date: Tue, 6 Jan 2026 13:53:36 -0700 Subject: [PATCH 15/34] Debug: pin libffi --- .github/workflows/test_pr_and_main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml index c79050b07b4..6a7a014e4f3 100644 --- a/.github/workflows/test_pr_and_main.yml +++ b/.github/workflows/test_pr_and_main.yml @@ -432,7 +432,7 @@ jobs: # as of 2025-12-12. pip 25.3 now packages the problematic platformdirs # version so excluding that also. if test "${{matrix.TARGET}}" == 'win'; then - CONDA_DEPENDENCIES="$CONDA_DEPENDENCIES setuptools<74.0.0 platformdirs!=4.5.0,!=4.5.1 pip<25.0" + CONDA_DEPENDENCIES="$CONDA_DEPENDENCIES setuptools<74.0.0 platformdirs!=4.5.0,!=4.5.1 libffi<3.5" fi # Note: this will fail the build if any installation fails (or # possibly if it outputs messages to stderr) @@ -509,6 +509,7 @@ jobs: conda install -q -y --force-reinstall libffi python if test -n "$PYPI_DEPENDENCIES"; then find `python -c "import os, os.path; print(os.path.dirname(os.__file__))"` -name \*conda_trash + ls -l "C:\Miniconda\envs\test\Lib\ctypes" python -c "import ctypes; print(ctypes.__file__)" python -c "import pip; print(pip.__version__, pip.__file__)" python -c "from pip._vendor import platformdirs; print(platformdirs.__version__, platformdirs.__file__)" From ec201511cd3740755240b2c9124f1a6e78f1c0ff Mon Sep 17 00:00:00 2001 From: John Siirola Date: Tue, 6 Jan 2026 14:20:48 -0700 Subject: [PATCH 16/34] Debug: add dir listings --- .github/workflows/test_pr_and_main.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml index 6a7a014e4f3..3dfe4542a80 100644 --- a/.github/workflows/test_pr_and_main.yml +++ b/.github/workflows/test_pr_and_main.yml @@ -506,10 +506,17 @@ jobs: # Re-try Pyomo (optional) dependencies with pip echo "" echo "Installing packages only available on PyPI" + find `python -c "import os, os.path; print(os.path.dirname(os.__file__))"` -name '*.conda_trash' + echo "LS LIB" + ls -l C:\\Miniconda\\envs\\test\\Lib\\* + echo "LS LIB/CTYPES" + ls -l C:\\Miniconda\\envs\\test\\Lib\\ctypes\\* conda install -q -y --force-reinstall libffi python + echo "LS LIB" + ls -l C:\\Miniconda\\envs\\test\\Lib\\* + echo "LS LIB/CTYPES" + ls -l C:\\Miniconda\\envs\\test\\Lib\\ctypes\\* if test -n "$PYPI_DEPENDENCIES"; then - find `python -c "import os, os.path; print(os.path.dirname(os.__file__))"` -name \*conda_trash - ls -l "C:\Miniconda\envs\test\Lib\ctypes" python -c "import ctypes; print(ctypes.__file__)" python -c "import pip; print(pip.__version__, pip.__file__)" python -c "from pip._vendor import platformdirs; print(platformdirs.__version__, platformdirs.__file__)" From db32bf0137a6c7865b5564571672345c3ba6470c Mon Sep 17 00:00:00 2001 From: John Siirola Date: Tue, 6 Jan 2026 14:58:54 -0700 Subject: [PATCH 17/34] Debug: change ls --- .github/workflows/test_pr_and_main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml index 3dfe4542a80..3bc22d8d826 100644 --- a/.github/workflows/test_pr_and_main.yml +++ b/.github/workflows/test_pr_and_main.yml @@ -508,9 +508,9 @@ jobs: echo "Installing packages only available on PyPI" find `python -c "import os, os.path; print(os.path.dirname(os.__file__))"` -name '*.conda_trash' echo "LS LIB" - ls -l C:\\Miniconda\\envs\\test\\Lib\\* + ls -l `python -c "import os, os.path; print(os.path.dirname(os.__file__))"` echo "LS LIB/CTYPES" - ls -l C:\\Miniconda\\envs\\test\\Lib\\ctypes\\* + ls -l `python -c "import os, os.path; print(os.path.join(os.path.dirname(os.__file__), 'ctypes'))"` conda install -q -y --force-reinstall libffi python echo "LS LIB" ls -l C:\\Miniconda\\envs\\test\\Lib\\* From 1be6355a64af1dab859c1d74aa7c9eccbd72dfd3 Mon Sep 17 00:00:00 2001 From: John Siirola Date: Wed, 7 Jan 2026 07:12:13 -0700 Subject: [PATCH 18/34] Debug: print the path --- .github/workflows/test_pr_and_main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml index 3bc22d8d826..1567442002b 100644 --- a/.github/workflows/test_pr_and_main.yml +++ b/.github/workflows/test_pr_and_main.yml @@ -507,6 +507,8 @@ jobs: echo "" echo "Installing packages only available on PyPI" find `python -c "import os, os.path; print(os.path.dirname(os.__file__))"` -name '*.conda_trash' + pwd + ls /mnt echo "LS LIB" ls -l `python -c "import os, os.path; print(os.path.dirname(os.__file__))"` echo "LS LIB/CTYPES" From bf01cb168f8a81fef3bd09b9fa9bee9bb216e46b Mon Sep 17 00:00:00 2001 From: John Siirola Date: Wed, 7 Jan 2026 07:47:32 -0700 Subject: [PATCH 19/34] Debug: probe filesystem --- .github/workflows/test_pr_and_main.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml index 1567442002b..eeb204013df 100644 --- a/.github/workflows/test_pr_and_main.yml +++ b/.github/workflows/test_pr_and_main.yml @@ -367,6 +367,14 @@ jobs: - name: Install Python packages (conda) if: matrix.PYENV == 'conda' run: | + echo "LS /" + ls / + echo "LS /d" + ls /d + echo "LS /d/a" + ls /d/a + echo "LS /c" + ls /c # Set up environment conda config --set always_yes yes conda config --set auto_update_conda false From f64f882f2a11125d2fb71403fbbf744fbc7a88e1 Mon Sep 17 00:00:00 2001 From: John Siirola Date: Wed, 7 Jan 2026 07:56:12 -0700 Subject: [PATCH 20/34] Debug: update dir probes --- .github/workflows/test_pr_and_main.yml | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml index eeb204013df..69b53edbc27 100644 --- a/.github/workflows/test_pr_and_main.yml +++ b/.github/workflows/test_pr_and_main.yml @@ -367,14 +367,6 @@ jobs: - name: Install Python packages (conda) if: matrix.PYENV == 'conda' run: | - echo "LS /" - ls / - echo "LS /d" - ls /d - echo "LS /d/a" - ls /d/a - echo "LS /c" - ls /c # Set up environment conda config --set always_yes yes conda config --set auto_update_conda false @@ -516,16 +508,15 @@ jobs: echo "Installing packages only available on PyPI" find `python -c "import os, os.path; print(os.path.dirname(os.__file__))"` -name '*.conda_trash' pwd - ls /mnt - echo "LS LIB" - ls -l `python -c "import os, os.path; print(os.path.dirname(os.__file__))"` - echo "LS LIB/CTYPES" - ls -l `python -c "import os, os.path; print(os.path.join(os.path.dirname(os.__file__), 'ctypes'))"` + echo "LS /c/Miniconda/envs/test" + ls /c/Miniconda/envs/test + echo "LS /c/Miniconda/envs/test/Lib" + ls /c/Miniconda/envs/test/Lib + echo "LS /c/Miniconda/envs/test/Lib/ctypes" + ls /c/Miniconda/envs/test/Lib/ctypes conda install -q -y --force-reinstall libffi python - echo "LS LIB" - ls -l C:\\Miniconda\\envs\\test\\Lib\\* - echo "LS LIB/CTYPES" - ls -l C:\\Miniconda\\envs\\test\\Lib\\ctypes\\* + echo "LS /c/Miniconda/envs/test/Lib/ctypes" + ls /c/Miniconda/envs/test/Lib/ctypes if test -n "$PYPI_DEPENDENCIES"; then python -c "import ctypes; print(ctypes.__file__)" python -c "import pip; print(pip.__version__, pip.__file__)" From 222f4ee23b1d85079574821117c15221d174ad45 Mon Sep 17 00:00:00 2001 From: John Siirola Date: Wed, 7 Jan 2026 09:03:04 -0700 Subject: [PATCH 21/34] Debug: more dir listing --- .github/workflows/test_pr_and_main.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml index 69b53edbc27..3d2c520bad3 100644 --- a/.github/workflows/test_pr_and_main.yml +++ b/.github/workflows/test_pr_and_main.yml @@ -398,6 +398,12 @@ jobs: conda list --show-channel-urls which python python --version + echo "LS /c/Miniconda/envs/test" + ls /c/Miniconda/envs/test + echo "LS /c/Miniconda/envs/test/Lib" + ls /c/Miniconda/envs/test/Lib + echo "LS /c/Miniconda/envs/test/Lib/ctypes" + ls /c/Miniconda/envs/test/Lib/ctypes # We need setuptools so we can run Pyomo's setup.py conda install setuptools # Note: some pypi packages are not available through conda @@ -507,14 +513,13 @@ jobs: echo "" echo "Installing packages only available on PyPI" find `python -c "import os, os.path; print(os.path.dirname(os.__file__))"` -name '*.conda_trash' - pwd echo "LS /c/Miniconda/envs/test" ls /c/Miniconda/envs/test echo "LS /c/Miniconda/envs/test/Lib" ls /c/Miniconda/envs/test/Lib echo "LS /c/Miniconda/envs/test/Lib/ctypes" ls /c/Miniconda/envs/test/Lib/ctypes - conda install -q -y --force-reinstall libffi python + conda install -q -y --force-reinstall libffi python python-abi echo "LS /c/Miniconda/envs/test/Lib/ctypes" ls /c/Miniconda/envs/test/Lib/ctypes if test -n "$PYPI_DEPENDENCIES"; then From 18cfa1d858633ad4a6662a904624dc0f6aeadc0d Mon Sep 17 00:00:00 2001 From: John Siirola Date: Wed, 7 Jan 2026 09:37:21 -0700 Subject: [PATCH 22/34] Debug: check initial conda env --- .github/workflows/test_pr_and_main.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml index 3d2c520bad3..bc94f14f2bd 100644 --- a/.github/workflows/test_pr_and_main.yml +++ b/.github/workflows/test_pr_and_main.yml @@ -404,6 +404,11 @@ jobs: ls /c/Miniconda/envs/test/Lib echo "LS /c/Miniconda/envs/test/Lib/ctypes" ls /c/Miniconda/envs/test/Lib/ctypes + python -c "import ctypes; print(ctypes.__file__)" + python -c "import ctypes.windll; print(ctypes.windll.__file__)" + python -c "import pip; print(pip.__version__, pip.__file__)" + python -c "from pip._vendor import platformdirs; print(platformdirs.__version__, platformdirs.__file__)" + python -c "import platformdirs; print(platformdirs.__version__, platformdirs.__file__)" # We need setuptools so we can run Pyomo's setup.py conda install setuptools # Note: some pypi packages are not available through conda @@ -519,7 +524,7 @@ jobs: ls /c/Miniconda/envs/test/Lib echo "LS /c/Miniconda/envs/test/Lib/ctypes" ls /c/Miniconda/envs/test/Lib/ctypes - conda install -q -y --force-reinstall libffi python python-abi + conda install -q -y --force-reinstall libffi python python_abi echo "LS /c/Miniconda/envs/test/Lib/ctypes" ls /c/Miniconda/envs/test/Lib/ctypes if test -n "$PYPI_DEPENDENCIES"; then From 44e31965ad7cec6660116ae8ecf10953e71b5cae Mon Sep 17 00:00:00 2001 From: John Siirola Date: Wed, 7 Jan 2026 09:43:10 -0700 Subject: [PATCH 23/34] Debug: remove debugging --- .github/workflows/test_pr_and_main.yml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml index bc94f14f2bd..a72041be366 100644 --- a/.github/workflows/test_pr_and_main.yml +++ b/.github/workflows/test_pr_and_main.yml @@ -398,17 +398,6 @@ jobs: conda list --show-channel-urls which python python --version - echo "LS /c/Miniconda/envs/test" - ls /c/Miniconda/envs/test - echo "LS /c/Miniconda/envs/test/Lib" - ls /c/Miniconda/envs/test/Lib - echo "LS /c/Miniconda/envs/test/Lib/ctypes" - ls /c/Miniconda/envs/test/Lib/ctypes - python -c "import ctypes; print(ctypes.__file__)" - python -c "import ctypes.windll; print(ctypes.windll.__file__)" - python -c "import pip; print(pip.__version__, pip.__file__)" - python -c "from pip._vendor import platformdirs; print(platformdirs.__version__, platformdirs.__file__)" - python -c "import platformdirs; print(platformdirs.__version__, platformdirs.__file__)" # We need setuptools so we can run Pyomo's setup.py conda install setuptools # Note: some pypi packages are not available through conda From 9369bd47e9f1857deb28f4b4a0bd49912a462232 Mon Sep 17 00:00:00 2001 From: John Siirola Date: Wed, 7 Jan 2026 10:04:27 -0700 Subject: [PATCH 24/34] Debug: check ctypes earlier --- .github/workflows/test_pr_and_main.yml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml index a72041be366..aeb2dc4f90d 100644 --- a/.github/workflows/test_pr_and_main.yml +++ b/.github/workflows/test_pr_and_main.yml @@ -368,6 +368,7 @@ jobs: if: matrix.PYENV == 'conda' run: | # Set up environment + python -c "import ctypes; print(ctypes.__file__)" conda config --set always_yes yes conda config --set auto_update_conda false conda config --set channel_priority strict @@ -386,6 +387,7 @@ jobs: conda config --set solver libmamba fi fi + python -c "import ctypes; print(ctypes.__file__)" # Add the rest of the channels conda config --append channels gurobi conda config --append channels ibmdecisionoptimization @@ -506,16 +508,8 @@ jobs: # Re-try Pyomo (optional) dependencies with pip echo "" echo "Installing packages only available on PyPI" - find `python -c "import os, os.path; print(os.path.dirname(os.__file__))"` -name '*.conda_trash' - echo "LS /c/Miniconda/envs/test" - ls /c/Miniconda/envs/test - echo "LS /c/Miniconda/envs/test/Lib" - ls /c/Miniconda/envs/test/Lib - echo "LS /c/Miniconda/envs/test/Lib/ctypes" - ls /c/Miniconda/envs/test/Lib/ctypes + find /c/Miniconda/envs/test/Lib -name '*.conda_trash' conda install -q -y --force-reinstall libffi python python_abi - echo "LS /c/Miniconda/envs/test/Lib/ctypes" - ls /c/Miniconda/envs/test/Lib/ctypes if test -n "$PYPI_DEPENDENCIES"; then python -c "import ctypes; print(ctypes.__file__)" python -c "import pip; print(pip.__version__, pip.__file__)" From 14d759554a54b39200d6d9a904fa28974462e4d8 Mon Sep 17 00:00:00 2001 From: John Siirola Date: Wed, 7 Jan 2026 11:23:27 -0700 Subject: [PATCH 25/34] Debug: locate where ctypes starts failing --- .github/workflows/test_pr_and_main.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml index aeb2dc4f90d..6b6266d2679 100644 --- a/.github/workflows/test_pr_and_main.yml +++ b/.github/workflows/test_pr_and_main.yml @@ -368,7 +368,7 @@ jobs: if: matrix.PYENV == 'conda' run: | # Set up environment - python -c "import ctypes; print(ctypes.__file__)" + python -c "import ctypes; print('CTYPES', ctypes.__file__)" conda config --set always_yes yes conda config --set auto_update_conda false conda config --set channel_priority strict @@ -387,7 +387,7 @@ jobs: conda config --set solver libmamba fi fi - python -c "import ctypes; print(ctypes.__file__)" + python -c "import ctypes; print('CTYPES', ctypes.__file__)" # Add the rest of the channels conda config --append channels gurobi conda config --append channels ibmdecisionoptimization @@ -402,6 +402,7 @@ jobs: python --version # We need setuptools so we can run Pyomo's setup.py conda install setuptools + python -c "import ctypes; print('CTYPES', ctypes.__file__)" # Note: some pypi packages are not available through conda PYOMO_DEPENDENCIES=`python setup.py dependencies \ --extras "$EXTRAS" | tail -1` @@ -439,6 +440,7 @@ jobs: # Note: this will fail the build if any installation fails (or # possibly if it outputs messages to stderr) conda install --update-deps -q -y python="${{matrix.python}}" $CONDA_DEPENDENCIES + python -c "import ctypes; print('CTYPES', ctypes.__file__)" if test -z "${{matrix.slim}}"; then # xpress.init() (xpress 9.5.1 from conda) hangs indefinitely # on GHA/Windows under Python 3.10 and 3.11. Exclude that @@ -498,6 +500,7 @@ jobs: kill $timeout_pid 2>/dev/null \ || echo "TIMEOUT: time limit expired" fi + python -c "import ctypes; print('CTYPES', ctypes.__file__)" fi echo "" if test -z "$_BUILDS"; then @@ -508,6 +511,7 @@ jobs: # Re-try Pyomo (optional) dependencies with pip echo "" echo "Installing packages only available on PyPI" + python -c "import ctypes; print('CTYPES', ctypes.__file__)" find /c/Miniconda/envs/test/Lib -name '*.conda_trash' conda install -q -y --force-reinstall libffi python python_abi if test -n "$PYPI_DEPENDENCIES"; then From f3a239188a5cf4f551143153a3cd28c44196c911 Mon Sep 17 00:00:00 2001 From: John Siirola Date: Wed, 7 Jan 2026 11:39:32 -0700 Subject: [PATCH 26/34] Debug: remove --update-deps --- .github/workflows/test_pr_and_main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml index 6b6266d2679..68d674863cd 100644 --- a/.github/workflows/test_pr_and_main.yml +++ b/.github/workflows/test_pr_and_main.yml @@ -439,7 +439,8 @@ jobs: fi # Note: this will fail the build if any installation fails (or # possibly if it outputs messages to stderr) - conda install --update-deps -q -y python="${{matrix.python}}" $CONDA_DEPENDENCIES + # Note: remove '--update-deps' to prevent update that breaks ctypes + conda install -q -y python="${{matrix.python}}" $CONDA_DEPENDENCIES python -c "import ctypes; print('CTYPES', ctypes.__file__)" if test -z "${{matrix.slim}}"; then # xpress.init() (xpress 9.5.1 from conda) hangs indefinitely From 525b0995188037e59bb13af92f392e0072e525a2 Mon Sep 17 00:00:00 2001 From: John Siirola Date: Wed, 7 Jan 2026 11:50:41 -0700 Subject: [PATCH 27/34] Debug: remove libffi spec --- .github/workflows/test_pr_and_main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml index 68d674863cd..e072a2f51b5 100644 --- a/.github/workflows/test_pr_and_main.yml +++ b/.github/workflows/test_pr_and_main.yml @@ -435,7 +435,7 @@ jobs: # as of 2025-12-12. pip 25.3 now packages the problematic platformdirs # version so excluding that also. if test "${{matrix.TARGET}}" == 'win'; then - CONDA_DEPENDENCIES="$CONDA_DEPENDENCIES setuptools<74.0.0 platformdirs!=4.5.0,!=4.5.1 libffi<3.5" + CONDA_DEPENDENCIES="$CONDA_DEPENDENCIES setuptools<74.0.0 platformdirs!=4.5.0,!=4.5.1" fi # Note: this will fail the build if any installation fails (or # possibly if it outputs messages to stderr) From bba121a1ef8f43e000c771b32aa8a005b6ebaa05 Mon Sep 17 00:00:00 2001 From: John Siirola Date: Wed, 7 Jan 2026 12:03:26 -0700 Subject: [PATCH 28/34] Debug: pin installed packages --- .github/workflows/test_pr_and_main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml index e072a2f51b5..7bd19d4c21d 100644 --- a/.github/workflows/test_pr_and_main.yml +++ b/.github/workflows/test_pr_and_main.yml @@ -440,7 +440,7 @@ jobs: # Note: this will fail the build if any installation fails (or # possibly if it outputs messages to stderr) # Note: remove '--update-deps' to prevent update that breaks ctypes - conda install -q -y python="${{matrix.python}}" $CONDA_DEPENDENCIES + conda install -q -y --no-update-deps python="${{matrix.python}}" $CONDA_DEPENDENCIES python -c "import ctypes; print('CTYPES', ctypes.__file__)" if test -z "${{matrix.slim}}"; then # xpress.init() (xpress 9.5.1 from conda) hangs indefinitely From 2ec98d521c00f859af01c7d4dc06d92e54cab362 Mon Sep 17 00:00:00 2001 From: John Siirola Date: Wed, 7 Jan 2026 12:15:34 -0700 Subject: [PATCH 29/34] Debug: update conda install cmd --- .github/workflows/test_pr_and_main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml index 7bd19d4c21d..20caaa70a45 100644 --- a/.github/workflows/test_pr_and_main.yml +++ b/.github/workflows/test_pr_and_main.yml @@ -440,7 +440,8 @@ jobs: # Note: this will fail the build if any installation fails (or # possibly if it outputs messages to stderr) # Note: remove '--update-deps' to prevent update that breaks ctypes - conda install -q -y --no-update-deps python="${{matrix.python}}" $CONDA_DEPENDENCIES + # Note: removed 'python="${{matrix.python}}"'... is it not necessary? + conda install -q -y --no-update-deps $CONDA_DEPENDENCIES python -c "import ctypes; print('CTYPES', ctypes.__file__)" if test -z "${{matrix.slim}}"; then # xpress.init() (xpress 9.5.1 from conda) hangs indefinitely From eadd8754b13847ad2389a92aedb450f92fbce0e5 Mon Sep 17 00:00:00 2001 From: John Siirola Date: Wed, 7 Jan 2026 13:34:11 -0700 Subject: [PATCH 30/34] Debug: explicitly pin libffi --- .github/workflows/test_pr_and_main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml index 20caaa70a45..e6ca36c14e0 100644 --- a/.github/workflows/test_pr_and_main.yml +++ b/.github/workflows/test_pr_and_main.yml @@ -387,6 +387,8 @@ jobs: conda config --set solver libmamba fi fi + # Pin libffi (updating it can break pip on windows) + conda config --env --append pinned_packages `conda list | grep libffi | sed -r 's/\s+(\S+).*/=\1/'` python -c "import ctypes; print('CTYPES', ctypes.__file__)" # Add the rest of the channels conda config --append channels gurobi From 5db443362ee1a6143ab9a1a16b8a19589414d1e5 Mon Sep 17 00:00:00 2001 From: John Siirola Date: Wed, 7 Jan 2026 13:57:24 -0700 Subject: [PATCH 31/34] Debug: explicitly update environment --- .github/workflows/test_pr_and_main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml index e6ca36c14e0..3abf90e0e49 100644 --- a/.github/workflows/test_pr_and_main.yml +++ b/.github/workflows/test_pr_and_main.yml @@ -387,6 +387,8 @@ jobs: conda config --set solver libmamba fi fi + conda update --all + python -c "import ctypes; print('CTYPES', ctypes.__file__)" # Pin libffi (updating it can break pip on windows) conda config --env --append pinned_packages `conda list | grep libffi | sed -r 's/\s+(\S+).*/=\1/'` python -c "import ctypes; print('CTYPES', ctypes.__file__)" From 93462cb41a5262bc0b4b440c259afb08e1ddc618 Mon Sep 17 00:00:00 2001 From: John Siirola Date: Wed, 7 Jan 2026 14:11:32 -0700 Subject: [PATCH 32/34] Debug: force reinstall pip --- .github/workflows/test_pr_and_main.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml index 3abf90e0e49..4d44d2b1cd4 100644 --- a/.github/workflows/test_pr_and_main.yml +++ b/.github/workflows/test_pr_and_main.yml @@ -387,10 +387,9 @@ jobs: conda config --set solver libmamba fi fi - conda update --all python -c "import ctypes; print('CTYPES', ctypes.__file__)" # Pin libffi (updating it can break pip on windows) - conda config --env --append pinned_packages `conda list | grep libffi | sed -r 's/\s+(\S+).*/=\1/'` + # conda config --env --append pinned_packages `conda list | grep libffi | sed -r 's/\s+(\S+).*/=\1/'` python -c "import ctypes; print('CTYPES', ctypes.__file__)" # Add the rest of the channels conda config --append channels gurobi @@ -518,8 +517,8 @@ jobs: echo "" echo "Installing packages only available on PyPI" python -c "import ctypes; print('CTYPES', ctypes.__file__)" - find /c/Miniconda/envs/test/Lib -name '*.conda_trash' - conda install -q -y --force-reinstall libffi python python_abi + conda install -q -y --force-reinstall pip libffi python python_abi + find /c/Miniconda/envs/test -name '*.conda_trash' if test -n "$PYPI_DEPENDENCIES"; then python -c "import ctypes; print(ctypes.__file__)" python -c "import pip; print(pip.__version__, pip.__file__)" From c222d197e3206a433128582f8354b503b7143cbe Mon Sep 17 00:00:00 2001 From: John Siirola Date: Wed, 7 Jan 2026 14:25:51 -0700 Subject: [PATCH 33/34] Debug: remove debugging --- .github/workflows/test_pr_and_main.yml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml index 4d44d2b1cd4..13e8a62ff02 100644 --- a/.github/workflows/test_pr_and_main.yml +++ b/.github/workflows/test_pr_and_main.yml @@ -387,10 +387,6 @@ jobs: conda config --set solver libmamba fi fi - python -c "import ctypes; print('CTYPES', ctypes.__file__)" - # Pin libffi (updating it can break pip on windows) - # conda config --env --append pinned_packages `conda list | grep libffi | sed -r 's/\s+(\S+).*/=\1/'` - python -c "import ctypes; print('CTYPES', ctypes.__file__)" # Add the rest of the channels conda config --append channels gurobi conda config --append channels ibmdecisionoptimization @@ -405,7 +401,6 @@ jobs: python --version # We need setuptools so we can run Pyomo's setup.py conda install setuptools - python -c "import ctypes; print('CTYPES', ctypes.__file__)" # Note: some pypi packages are not available through conda PYOMO_DEPENDENCIES=`python setup.py dependencies \ --extras "$EXTRAS" | tail -1` @@ -505,7 +500,6 @@ jobs: kill $timeout_pid 2>/dev/null \ || echo "TIMEOUT: time limit expired" fi - python -c "import ctypes; print('CTYPES', ctypes.__file__)" fi echo "" if test -z "$_BUILDS"; then @@ -516,14 +510,8 @@ jobs: # Re-try Pyomo (optional) dependencies with pip echo "" echo "Installing packages only available on PyPI" - python -c "import ctypes; print('CTYPES', ctypes.__file__)" conda install -q -y --force-reinstall pip libffi python python_abi - find /c/Miniconda/envs/test -name '*.conda_trash' if test -n "$PYPI_DEPENDENCIES"; then - python -c "import ctypes; print(ctypes.__file__)" - python -c "import pip; print(pip.__version__, pip.__file__)" - python -c "from pip._vendor import platformdirs; print(platformdirs.__version__, platformdirs.__file__)" - python -c "import platformdirs; print(platformdirs.__version__, platformdirs.__file__)" python -m pip install --cache-dir cache/pip $PYPI_DEPENDENCIES fi # remember this python interpreter From 9514228968592c56ec9f0d8f09cc1ad560d4ecea Mon Sep 17 00:00:00 2001 From: John Siirola Date: Thu, 8 Jan 2026 08:01:42 -0700 Subject: [PATCH 34/34] Debug: force reinstall of additional packages --- .github/workflows/test_pr_and_main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml index 13e8a62ff02..409303ea42e 100644 --- a/.github/workflows/test_pr_and_main.yml +++ b/.github/workflows/test_pr_and_main.yml @@ -510,7 +510,8 @@ jobs: # Re-try Pyomo (optional) dependencies with pip echo "" echo "Installing packages only available on PyPI" - conda install -q -y --force-reinstall pip libffi python python_abi + conda install -q -y --force-reinstall pip libffi python python_abi \ + `conda list | grep -E 'zlib|^vc|^vs' | cut -d\ -f1` if test -n "$PYPI_DEPENDENCIES"; then python -m pip install --cache-dir cache/pip $PYPI_DEPENDENCIES fi