Skip to content

Windows Installation and Binary Compatibility Issues (Python 3.13/3.14) #482

@HTalNachmani

Description

@HTalNachmani

Description: Following up on the recent Python 3.14 migration (PR #14), I’ve encountered two significant blockers for Windows users: a solver failure on Python 3.14 and a binary runtime error on Python 3.13.

Problem 1: Solver Failure (Python 3.14)
Even though the build is deployed, it is currently impossible to install rsatoolbox in a Python 3.14 environment on Windows via Conda.

The Conflict: There is a dependency mismatch involving blas (mkl), numpy, and scipy.

Command: conda install python=3.14 rsatoolbox

Error Details:

[!IMPORTANT] The solver reports that scipy requires libblas 3.9 (pulling blas 2.305), but numpy requires blas 1.0.
conda install python=3.14
3 channel Terms of Service accepted
Channels:

  • defaults
    Platform: win-64
    Collecting package metadata (repodata.json): done
    Solving environment: failed
LibMambaUnsatisfiableError: Encountered problems while solving:
  - package rsatoolbox-0.3.2-py312he06e257_0 requires scipy >=1.17.0,<2.0a0, but none of the providers can be installed

Could not solve for environment specs
The following packages are incompatible
├─ python =3.14 * is requested and can be installed;
└─ rsatoolbox =* * is not installable because it requires
   └─ scipy >=1.17.0,<2.0a0 *, which requires
      ├─ libblas >=3.9.0,<4.0a0 *, which requires
      │  └─ blas ==2.305 mkl, which can be installed;
      └─ numpy >=1.25.2 * but there are no viable options
         ├─ numpy 2.4.1 would require
         │  └─ python_abi =3.12 *_cp312 but there are no viable options
         │     ├─ python_abi 3.12 would require
         │     │  └─ python =3.12 *_cpython, which conflicts with any installable versions previously reported;
         │     └─ python_abi 3.12 would require
         │        └─ python =3.12 *, which conflicts with any installable versions previously reported;
         └─ numpy [1.25.2|1.26.0|...|2.4.1] would require
            └─ blas ==1.0 mkl, which conflicts with any installable versions previously reported.

Problem 2: DLL Load Failure (Python 3.13)
After downgrading to Python 3.13, the package installs but fails at runtime. This appears to be a binary incompatibility with the h5py dependency.

Error: ImportError: DLL load failed while importing defs: The specified procedure could not be found.

Context: Occurs during import rsatoolbox when it attempts to load h5py via rsatoolbox.io.hdf5. Occurs specifically when running on a jupyter notebook.

ImportError                               Traceback (most recent call last)
Cell In[2], line 2
      1 import numpy as np
----> 2 import rsatoolbox as rsatool

File c:\Users\hagar\miniconda3\envs\physio\Lib\site-packages\rsatoolbox\__init__.py:7
      3 """ Top level package: Only imports and organisation
      4 """
      6 from . import cengine
----> 7 from . import data
      8 from . import inference
      9 from . import model

File c:\Users\hagar\miniconda3\envs\physio\Lib\site-packages\rsatoolbox\data\__init__.py:1
----> 1 from .dataset import Dataset
      2 from .dataset import TemporalDataset
      3 load_dataset

File c:\Users\hagar\miniconda3\envs\physio\Lib\site-packages\rsatoolbox\data\dataset.py:24
     22 from rsatoolbox.util.descriptor_utils import parse_input_descriptor
     23 from rsatoolbox.util.descriptor_utils import desc_eq
---> 24 from rsatoolbox.io.hdf5 import read_dict_hdf5
     25 from rsatoolbox.io.pkl import read_dict_pkl
     26 from rsatoolbox.data.base import DatasetBase

File c:\Users\hagar\miniconda3\envs\physio\Lib\site-packages\rsatoolbox\io\hdf5.py:12
     10 except ModuleNotFoundError:
     11     from importlib_metadata import version
---> 12 from h5py import File, Group, Empty
     13 import numpy as np
     16 def write_dict_hdf5(fhandle: Union[str, IO], dictionary: Dict) -> None:

File c:\Users\hagar\miniconda3\envs\physio\Lib\site-packages\h5py\__init__.py:33
     30     else:
     31         raise
---> 33 from . import version
     35 if version.hdf5_version_tuple != version.hdf5_built_version_tuple:
     36     _warn(("h5py is running against HDF5 {0} when it was built against {1}, "
     37            "this may cause problems").format(
     38             '{0}.{1}.{2}'.format(*version.hdf5_version_tuple),
     39             '{0}.{1}.{2}'.format(*version.hdf5_built_version_tuple)
     40     ))

File c:\Users\hagar\miniconda3\envs\physio\Lib\site-packages\h5py\version.py:15
     10 """
     11     Versioning module for h5py.
     12 """
     14 from collections import namedtuple
---> 15 from . import h5 as _h5
     16 import sys
     17 import numpy

File h5py/h5.pyx:1, in init h5py.h5()

ImportError: DLL load failed while importing defs: The specified procedure could not be found.  

It might all be my own lack of experience, so if that is the case, I really apologize! I tried to see whether anyone else had encountered the same error but it didn't seem so. Thank you for any response!

Environment Info:

  • OS: Windows 11 (win-64)
  • Conda Version: conda 25.11.1
  • Channels: defaults, conda-forge

Current Workaround: The only stable way I found to run rsatoolbox on Windows was to create a fresh environment restricted to Python 3.12.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions