biosimspace icon indicating copy to clipboard operation
biosimspace copied to clipboard

alchemlyb dependency pulling in invalid Jaxlib version on Python 3.9 and 3.10

Open lohedges opened this issue 2 years ago • 1 comments

Despite our package building against the correct version of jaxlib, i.e.:

    jax:                           0.4.19-pyhd8ed1ab_0           conda-forge         
    jaxlib:                        0.4.19-cpu_py39h45b9b01_0     conda-forge       

when installing the Python 3.9 development version of BioSimSpace you end up with the wrong version:

  + jax                                  0.3.14  pyhd8ed1ab_0            conda-forge/noarch                 846kB
  + jaxlib                               0.1.75  py39hde0f152_0          conda-forge/linux-64                57MB

which gives the following error when alchemlyb is imported:

RuntimeError: jaxlib is version 0.1.75, but this version of jax requires version
>= 0.3.7.

Weirdly, the same thing happens when installing alchemlyb alone:

mamba create -n test -c conda-forge alchemlyb python=3.9

gives:

  + jax                        0.3.14  pyhd8ed1ab_0         conda-forge/noarch        846kB
  + jaxlib                     0.1.75  py39hde0f152_0       conda-forge/linux-64       57MB

I thought jax came in via pymbar, but installing this alone gives the correct version:

mamba create -n test -c conda-forge pymbar python=3.9

gives:

  + jax                     0.4.19  pyhd8ed1ab_0             conda-forge/noarch          1MB
  + jaxlib                  0.4.19  cuda118py39h1ceb2bc_200  conda-forge/linux-64       99MB

lohedges avatar Nov 14 '23 10:11 lohedges

As found here, a workaround is to pin the version of pymbar to 4.0.2. Currently version 4.0.1 is pulled in by default, which pulls in an incompatible version of jaxlib.

mamba create -n openbiosim -c conda-forge -c openbiosim/label/dev biosimspace pymbar=4.0.2 python=3.10

lohedges avatar Nov 15 '23 09:11 lohedges

Closing as this hasn't been an issue recently. I still don't think it's properly fixed, but the issue (and solution) is searchable.

lohedges avatar Jun 17 '24 12:06 lohedges