Having trouble in installing scanpy in python

454 Views Asked by At

My python version is 3.8. However, while Im trying to install scanpy using this command pip install scanpy in jupyter notebook, I'm getting following error message:

ERROR: matplotlib 3.5.3 has requirement packaging>=20.0, but you'll have packaging 19.2 which is incompatible.
ERROR: anndata 0.8.0 has requirement packaging>=20, but you'll have packaging 19.2 which is incompatible.
ERROR: pynndescent 0.5.8 has requirement importlib-metadata>=4.8.1; python_version < "3.8", but you'll have importlib-metadata 0.23 which is incompatible.
ERROR: pynndescent 0.5.8 has requirement llvmlite>=0.30, but you'll have llvmlite 0.29.0 which is incompatible.
ERROR: pynndescent 0.5.8 has requirement numba>=0.51.2, but you'll have numba 0.45.1 which is incompatible.
ERROR: umap-learn 0.5.3 has requirement numba>=0.49, but you'll have numba 0.45.1 which is incompatible.
ERROR: Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 'c:\\programdata\\anaconda3\\lib\\site-packages\\numpy\\compat\\py3k.py'
Consider using the `--user` option or check the permissions.

Now I am unable to understand what should I do to fix this issue. Please assist me.

install scanpy

I have run this command in shell, but when I use jypyter notebook it again shows error message

I have restart the kernel but problem is still there....

1

There are 1 best solutions below

2
On

As the error you posted says, it looks like you don't have permissions to install the required package. Try again the same command but in a shell opened as administrator.

Here's how to do it: https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/jj717276(v=ws.11)

As an alternative, you can run jupyter itself as administrator. This should be enough as permission to install whatever you need.