From 2994e43f82fb4d6e6500f63142d0e570341f428c Mon Sep 17 00:00:00 2001 From: Ben Dichter Date: Wed, 4 Mar 2026 11:50:18 -0500 Subject: [PATCH 1/2] Pin numpy < 2 to fix PyInstaller bundling numpy 2.x reorganized internals from numpy.core to numpy._core. PyInstaller 6.7.0 with pyinstaller-hooks-contrib 2024.6 doesn't bundle numpy._core._exceptions, causing ModuleNotFoundError at runtime in the built executable. Co-Authored-By: Claude Opus 4.6 --- environments/environment-Linux.yml | 1 + environments/environment-MAC-apple-silicon.yml | 2 +- environments/environment-MAC-intel.yml | 1 + environments/environment-Windows.yml | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/environments/environment-Linux.yml b/environments/environment-Linux.yml index db722fe28..4b8e6910b 100644 --- a/environments/environment-Linux.yml +++ b/environments/environment-Linux.yml @@ -22,4 +22,5 @@ dependencies: - ndx-pose == 0.2.2 - nwbinspector == 0.6.5 - tables + - numpy < 2 # numpy 2.x breaks PyInstaller 6.7.0 bundling (missing numpy._core._exceptions) - numcodecs == 0.15.1 # numcodecs 0.16.0 is not compatible with zarr 2.18.5 diff --git a/environments/environment-MAC-apple-silicon.yml b/environments/environment-MAC-apple-silicon.yml index 32706a986..939472090 100644 --- a/environments/environment-MAC-apple-silicon.yml +++ b/environments/environment-MAC-apple-silicon.yml @@ -8,7 +8,7 @@ dependencies: # Install these from conda-forge so that dependent packages get included in the distributable - lxml = 4.9.3 # PyPI build fails due to x64/arm64 mismatch so install from conda-forge - pyedflib = 0.1.38 # PyPI build fails due to x64/arm64 mismatch so install from conda-forge - - numpy # May have x64/arm64 mismatch issues so install from conda-forge + - numpy < 2 # May have x64/arm64 mismatch issues so install from conda-forge; < 2 for PyInstaller compat - pytables = 3.10.2 # PyPI build fails on arm64 so install from conda-forge (used by neuroconv deps) - jsonschema = 4.18.0 # Also installs jsonschema-specifications - pip diff --git a/environments/environment-MAC-intel.yml b/environments/environment-MAC-intel.yml index 0802c33dc..386553dce 100644 --- a/environments/environment-MAC-intel.yml +++ b/environments/environment-MAC-intel.yml @@ -23,6 +23,7 @@ dependencies: - tzlocal == 5.3.1 # Frontend timezone handling - ndx-pose == 0.2.2 - nwbinspector == 0.6.5 + - numpy < 2 # numpy 2.x breaks PyInstaller 6.7.0 bundling (missing numpy._core._exceptions) - numcodecs == 0.15.1 # numcodecs 0.16.0 is not compatible with zarr 2.18.5 - h5py == 3.12.1 # 3.13.0 uses features in hdf5 1.14.4 that is not available in earlier hdf5 libs packaged # with tables==3.9.1 (latest that can be used by neuroconv 0.6.0). diff --git a/environments/environment-Windows.yml b/environments/environment-Windows.yml index 5d300c3cd..173404281 100644 --- a/environments/environment-Windows.yml +++ b/environments/environment-Windows.yml @@ -25,4 +25,5 @@ dependencies: - ndx-pose == 0.2.2 - nwbinspector == 0.6.5 - tables + - numpy < 2 # numpy 2.x breaks PyInstaller 6.7.0 bundling (missing numpy._core._exceptions) - numcodecs == 0.15.1 # numcodecs 0.16.0 is not compatible with zarr 2.18.5 From f3136981d55f2ed34d58bed56d9f2ab3c76c1bb4 Mon Sep 17 00:00:00 2001 From: Ben Dichter Date: Wed, 4 Mar 2026 12:00:00 -0500 Subject: [PATCH 2/2] Also pin numpy < 2 in pip section for MAC-apple-silicon Conda's numpy < 2 constraint doesn't prevent pip from upgrading numpy to 2.x when installing neuroconv dependencies. Co-Authored-By: Claude Opus 4.6 --- environments/environment-MAC-apple-silicon.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/environments/environment-MAC-apple-silicon.yml b/environments/environment-MAC-apple-silicon.yml index 939472090..7e92b0a3e 100644 --- a/environments/environment-MAC-apple-silicon.yml +++ b/environments/environment-MAC-apple-silicon.yml @@ -30,4 +30,5 @@ dependencies: - tzlocal == 5.3.1 # Frontend timezone handling - ndx-pose == 0.2.2 - nwbinspector == 0.6.5 + - numpy < 2 # numpy 2.x breaks PyInstaller 6.7.0 bundling (pin in pip too, since pip can override conda) - numcodecs == 0.15.1 # numcodecs 0.16.0 is not compatible with zarr 2.18.5