Trouble installing scanpy

Dear all,

I am using Mac OSX, and I am having trouble in installing scanpy. When I run a program using scanpy, it gives me this message: ImportError: Scanpy 1.4.4.post1 needs anndata version >=0.6.10, not 0.3.9.
Run pip install anndata -U --no-deps.

any advice for that

Thank you
Ahmed

Could you please post full error messages of both scanpy exception and the pip command?

This is the full error message when I tried to run the scanpy tutorial:

ImportError Traceback (most recent call last)
in
----> 1 import scanpy as sc

~/anaconda3/lib/python3.7/site-packages/scanpy/init.py in
25 version = get_versions()[‘version’]
26
—> 27 check_versions()
28 del get_versions, check_versions
29

~/anaconda3/lib/python3.7/site-packages/scanpy/utils.py in check_versions()
44 raise ImportError(‘Scanpy {} needs anndata version >=0.6.10, not {}.\n’
45 ‘Run pip install anndata -U --no-deps.’
—> 46 .format(version, anndata_version))
47
48 if umap_version < LooseVersion(‘0.3.0’):

ImportError: Scanpy 1.4.4.post1 needs anndata version >=0.6.10, not 0.3.9.
Run pip install anndata -U --no-deps.

Thank you

Can you also post the output of following commands:

which pip

and

pip install anndata -U --no-deps

(base) mlg-jgm199:scanpy-master abbasa$ which pip
/Users/abbasa/anaconda3/bin/pip

(base) mlg-jgm199:scanpy-master abbasa$ pip install anndata -U --no-deps
Requirement already up-to-date: anndata in /Users/abbasa/anaconda3/lib/python3.7/site-packages (0.6.22.post1)

There is an older anndata package installed somewhere and this confuses scanpy.

You can create a new conda environment or remove scanpy and anndata packages and install them from scratch or remove the anaconda installation completely and install everything from scratch.

Thank you for your answer

I installed anaconda, scanpy and anndata again, but still the same error arises

Maybe there is another problem?

Thank you

The command import scanpy as sc worked with me on another computer

I will check dca on this other computer and will send to you if I face trouble in running it

Thank you very much

Can you send the outputs of the following commands:

ls /usr/local/lib/python3.7/site-packages

and

ls ~/.local/lib/python3.7/site-packages

Scanpy is now working with me on the other Windows 10 computer

However, dca is not working now

when I write:

dca E:\dca-master\reproducibility\data\chu\chu_original .csv E:\dca-master\reproducibility\data\chu\res_dca

it gives me syntax error

Can you help me with this please?

Thanks

The error is

SyntaxError: invalid syntax

Thanks

DCA is now working well on the second computer. Thank you very much