I have installed ScanPy and AnnData in my linux environment, but I get the following ImportError: cannot import name 'PathLike' from 'anndata.compat'

I installed the following packages: conda install seaborn scikit-learn statsmodels numba pytables conda install -c conda-forge python-igraph leidenalg pip install scanpy conda install -c bioconda anndata

These are the versions: pytables 3.6.1 igraph 0.9.2 scanpy 1.7.2 anndata 0.7.6 Python 3.7.10

When I do import anndata I get the following error:

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-13-e912962f79bf> in <module>
----> 1 import anndata

~/anaconda3/envs/py-env/lib/python3.7/site-packages/anndata/__init__.py in <module>
----> 1 from .core.anndata import AnnData, Raw
      2 from .readwrite import (
      3     read_h5ad, read_loom, read_hdf,
      4     read_excel, read_umi_tools,
      5     read_csv, read_text, read_mtx,

~/anaconda3/envs/py-env/lib/python3.7/site-packages/anndata/core/anndata.py in <module>
     46     LayersBase, Layers
     47 )
---> 48 from .. import h5py
     49 from .views import ArrayView, SparseCSRView, SparseCSCView, DictView, DataFrameView
     50 

~/anaconda3/envs/py-env/lib/python3.7/site-packages/anndata/h5py/__init__.py in <module>
     22    SparseDataset
     23 """
---> 24 from .h5sparse import File, Group, SparseDataset, _load_h5_dataset_as_sparse
     25 from h5py import Dataset, special_dtype
     26 

~/anaconda3/envs/py-env/lib/python3.7/site-packages/anndata/h5py/h5sparse.py in <module>
     10 
     11 from ..utils import unpack_index
---> 12 from ..compat import PathLike
     13 
     14 from .utils import _chunked_rows

ImportError: cannot import name 'PathLike' from 'anndata.compat' (/home/ubuntu/anaconda3/envs/py-env/lib/python3.7/site-packages/anndata/compat/__init__.py)

0

There are 0 answers