Skip to content

Scanpy==1.6 cannot be imported for anndata<0.7.4 #1439

@WeilerP

Description

@WeilerP

Description

scanpy==1.6 cannot be used with anndata<=0.7.3 due to an import error in scanpy/__init__.py as concat cannot be imported from anndata.

Minimal code sample (that we can copy&paste without having any data)

import scanpy as sc
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/anaconda3/envs/scanpy_bug/lib/python3.8/site-packages/scanpy/__init__.py", line 41, in <module>
    from anndata import AnnData, concat
ImportError: cannot import name 'concat' from 'anndata' (/opt/anaconda3/envs/scanpy_bug/lib/python3.8/site-packages/anndata/__init__.py)

Versions

Details
-----
anndata     0.7.3
scanpy      1.6.0
sinfo       0.3.1
-----
anndata             0.7.3
cycler              0.10.0
cython_runtime      NA
dateutil            2.8.1
get_version         2.1
h5py                2.10.0
igraph              0.8.2
joblib              0.15.1
kiwisolver          1.2.0
legacy_api_wrap     1.2
leidenalg           0.8.2
llvmlite            0.33.0
louvain             0.7.0
matplotlib          3.2.1
mpl_toolkits        NA
natsort             7.0.1
numba               0.50.0
numexpr             2.7.1
numpy               1.18.5
packaging           20.4
pandas              1.1.2
pkg_resources       NA
pyparsing           2.4.7
pytz                2020.1
scanpy              1.6.0
scipy               1.4.1
setuptools_scm      NA
sinfo               0.3.1
six                 1.15.0
sklearn             0.23.1
tables              3.6.1
texttable           1.6.2
wcwidth             0.2.4
yaml                5.3.1
-----
Python 3.8.3 (default, May 19 2020, 13:54:14) [Clang 10.0.0 ]
macOS-10.15.7-x86_64-i386-64bit
12 logical CPU cores, i386
-----
Session information updated at 2020-10-03 14:22

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions