Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bknn's numpy pinnings are incompatible with current scanpy 1.9.8 #45942

Open
pcm32 opened this issue Feb 21, 2024 · 0 comments
Open

bknn's numpy pinnings are incompatible with current scanpy 1.9.8 #45942

pcm32 opened this issue Feb 21, 2024 · 0 comments

Comments

@pcm32
Copy link
Member

pcm32 commented Feb 21, 2024

Installation of newer bknn 1.6.0 package (att @ktpolanski) conflicts with numpy installation for scanpy 1.9.8:

The following packages are incompatible
      ├─ bbknn 1.6.0**  is installable with the potential options
      │  ├─ bbknn 1.6.0 would require
      │  │  └─ numpy >=1.26.2,<2.0a0  with the potential options
      │  │     ├─ numpy [1.21.3|1.21.4|...|1.26.4] would require
      │  │     │  ├─ python >=3.10,<3.11.0a0 , which can be installed;
      │  │     │  └─ python_abi 3.10.* *_cp310, which can be installed;
      │  │     ├─ numpy [1.23.4|1.23.5|...|1.26.4] would require
      │  │     │  ├─ python >=3.11,<3.12.0a0 , which can be installed;
      │  │     │  └─ python_abi 3.11.* *_cp311, which can be installed;
      │  │     ├─ numpy [1.26.2|1.26.3|1.26.4] would require
      │  │     │  └─ python_abi 3.12.* *_cp312, which can be installed;
      │  │     ├─ numpy [1.26.2|1.26.3|1.26.4], which can be installed;
      │  │     ├─ numpy [1.26.2|1.26.3] would require
      │  │     │  └─ pypy3.9 >=7.3.13 , which can be installed;
      │  │     └─ numpy 1.26.4 would require
      │  │        └─ pypy3.9 >=7.3.15 , which can be installed;
      │  ├─ bbknn 1.6.0 would require
      │  │  ├─ python >=3.10,<3.11.0a0 , which can be installed;
      │  │  └─ python_abi 3.10.* *_cp310, which can be installed;
      │  └─ bbknn 1.6.0 would require
      │     ├─ python >=3.8,<3.9.0a0 , which can be installed;
      │     └─ python_abi 3.8.* *_cp38, which can be installed;
      ├─ numpy >=1.17.3,<1.25.0  is installable with the potential options
      │  ├─ numpy [1.21.3|1.21.4|...|1.26.4], which can be installed (as previously explained);
      │  ├─ numpy [1.23.4|1.23.5|...|1.26.4], which can be installed (as previously explained);
      │  ├─ numpy [1.17.3|1.17.4|...|1.24.4] conflicts with any installable versions previously reported;
      │  ├─ numpy [1.17.3|1.17.5|1.18.1] would require
      │  │  └─ python >=3.6,<3.7.0a0 , which can be installed;
      │  ├─ numpy [1.17.3|1.17.5|1.18.1] would require
      │  │  └─ python >=3.7,<3.8.0a0 , which can be installed;
      │  ├─ numpy [1.17.3|1.17.5|1.18.1] would require
      │  │  └─ python >=3.8,<3.9.0a0 , which can be installed;
      │  ├─ numpy [1.17.5|1.18.1|...|1.19.5] would require
      │  │  ├─ python >=3.6,<3.7.0a0 , which can be installed;
      │  │  └─ python_abi 3.6.* *_cp36m, which can be installed;
      │  ├─ numpy [1.17.5|1.18.1|...|1.21.6] would require
      │  │  ├─ python >=3.7,<3.8.0a0 , which can be installed;
      │  │  └─ python_abi 3.7.* *_cp37m, which can be installed;
      │  ├─ numpy [1.17.5|1.18.1|...|1.24.4] would require
      │  │  ├─ python >=3.8,<3.9.0a0 , which can be installed;
      │  │  └─ python_abi 3.8.* *_cp38, which can be installed;
      │  ├─ numpy [1.18.1|1.18.4|...|1.19.5] would require
      │  │  └─ python_abi 3.6 *_pypy36_pp73, which can be installed;
      │  ├─ numpy [1.19.5|1.20.0|...|1.21.5] would require
      │  │  └─ python_abi 3.7 *_pypy37_pp73, which can be installed;
      │  ├─ numpy [1.19.5|1.20.3|...|1.24.1] would require
      │  │  └─ python_abi 3.8 *_pypy38_pp73, which can be installed;
      │  ├─ numpy [1.19.5|1.20.3|...|1.24.1] would require
      │  │  └─ python_abi 3.9 *_pypy39_pp73, which can be installed;
      │  ├─ numpy [1.24.2|1.24.3|1.24.4] would require
      │  │  └─ pypy3.8 >=7.3.11 , which can be installed;
      │  ├─ numpy [1.24.2|1.24.3|1.24.4] would require
      │  │  └─ pypy3.9 >=7.3.11 , which can be installed;
      │  ├─ numpy 1.23.3 would require
      │  │  └─ numpy-base 1.23.3 py310h375b286_0, which does not exist (perhaps a missing channel);
      │  └─ numpy 1.23.3 would require
      │     └─ numpy-base 1.23.3 py310h8e6c178_0, which does not exist (perhaps a missing channel);
      └─ python 3.9**  is not installable because it conflicts with any installable versions previously reported.

Pinning numpy to those versions is required or otherwise we get the following runtime error when running our tests:

# (in test file scanpy-scripts-tests.bats, line 677)
#   `run rm -f $bbknn_obj && eval "$scanpy integrate bbknn $bbknn_opt $louvain_obj $bbknn_obj"' failed
# /home/runner/micromamba-root/envs/scanpy-scripts/lib/python3.9/site-packages/scipy/__init__.py:146: UserWarning: A NumPy version >=1.17.3 and <1.25.0 is required for this version of SciPy (detected version 1.26.4
#   warnings.warn(f"A NumPy version >={np_minversion} and <{np_maxversion}"
# computing batch balanced neighbors
# Traceback (most recent call last):
#   File "/home/runner/micromamba-root/envs/scanpy-scripts/bin/scanpy-cli", line 8, in <module>
#     sys.exit(cli())
#   File "/home/runner/micromamba-root/envs/scanpy-scripts/lib/python3.9/site-packages/click/core.py", line 829, in __call__
#     return self.main(*args, **kwargs)
#   File "/home/runner/micromamba-root/envs/scanpy-scripts/lib/python3.9/site-packages/click/core.py", line 782, in main
#     rv = self.invoke(ctx)
#   File "/home/runner/micromamba-root/envs/scanpy-scripts/lib/python3.9/site-packages/click/core.py", line 12, in invoke
#     return _process_result(sub_ctx.command.invoke(sub_ctx))
#   File "/home/runner/micromamba-root/envs/scanpy-scripts/lib/python3.9/site-packages/click/core.py", line 1259, in invoke
#     return _process_result(sub_ctx.command.invoke(sub_ctx))
#   File "/home/runner/micromamba-root/envs/scanpy-scripts/lib/python3.9/site-packages/click/core.py", line 1066, in invoke
#     return ctx.invoke(self.callback, **ctx.params)
#   File "/home/runner/micromamba-root/envs/scanpy-scripts/lib/python3.9/site-packages/click/core.py", line , in invoke
#     return callback(*args, **kwargs)
#   File "/home/runner/micromamba-root/envs/scanpy-scripts/lib/python3.9/site-packages/scanpy_scripts/cmd_utils.py", line 49, in cmd
#     func(adata, **kwargs)
#   File "/home/runner/micromamba-root/envs/scanpy-scripts/lib/python3.9/site-packages/scanpy_scripts/lib/_bbknn.py", line 24, in bbknn
#     sce.pp.bbknn(adata, batch_key=key, **kwargs)
#   File "/home/runner/micromamba-root/envs/scanpy-scripts/lib/python3.9/site-packages/scanpy/external/pp/_bbknn.py", line 134, in bbknn
#     return bbknn(
#   File "/home/runner/micromamba-root/envs/scanpy-scripts/lib/python3.9/site-packages/bbknn/__init__.py", line 108, in bbknn
#     bbknn_out = matrix.bbknn(pca=pca, batch_list=batch_list, scanpy_logging=True, **kwargs)
#   File "/home/runner/micromamba-root/envs/scanpy-scripts/lib/python3.9/site-packages/bbknn/matrix.py", line 350, in bbknn
#     params['n_pcs'] = np.min([params['n_pcs'], pca.shape[1]])
#   File "/home/runner/micromamba-root/envs/scanpy-scripts/lib/python3.9/site-packages/numpy/core/fromnumeric.py", line 2953, in min
#     return _wrapreduction(a, np.minimum, 'min', axis, None, out,
#   File "/home/runner/micromamba-root/envs/scanpy-scripts/lib/python3.9/site-packages/numpy/core/fromnumeric.py", line 88, in _wrapreduction
#     return ufunc.reduce(obj, axis, dtype, out, **passkwargs)
# TypeError: '<=' not supported between instances of 'NoneType' and 'int'

Not sure what might be forcing that scipy version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant