0

When trying to install scanpy, I get the following error

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
poetry 1.1.11 requires packaging<21.0,>=20.4, but you have packaging 21.2 which is incompatible

In that sense, I tried to downgrade packaging from version 21.2 to 20.9 or 20.8, with

! pip install --upgrade packaging==20.9

or with

! pip uninstall packaging -y
! pip install -I packaging==20.8

but I still get that error, as if the packaging version did not change.

Here is the full block

! pip install --upgrade packaging==20.9
#! pip uninstall packaging -y
#! pip install -I packaging==20.8
#! pip install poetry --upgrade
! pip uninstall scanpy -y
! pip install -I scanpy

and the full output

Collecting packaging==20.9
  Using cached packaging-20.9-py2.py3-none-any.whl (40 kB)
Requirement already satisfied: pyparsing>=2.0.2 in /data04/projects04/MarianaBoroni/lbbc_members/lib/conda_envs/diogoamb/lib/python3.9/site-packages (from packaging==20.9) (3.0.4)
Installing collected packages: packaging
  Attempting uninstall: packaging
    Found existing installation: packaging 21.2
    Uninstalling packaging-21.2:
      Successfully uninstalled packaging-21.2
Successfully installed packaging-20.9
Found existing installation: scanpy 1.8.2
Uninstalling scanpy-1.8.2:
  Successfully uninstalled scanpy-1.8.2
Collecting scanpy
  Using cached scanpy-1.8.2-py3-none-any.whl (2.0 MB)
Collecting anndata>=0.7.4
  Using cached anndata-0.7.6-py3-none-any.whl (127 kB)
Collecting h5py>=2.10.0
  Using cached h5py-3.5.0-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (4.5 MB)
Collecting scipy>=1.4
  Using cached scipy-1.7.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl (28.5 MB)
Collecting sinfo
  Using cached sinfo-0.3.4-py3-none-any.whl
Collecting matplotlib>=3.1.2
  Using cached matplotlib-3.4.3-cp39-cp39-manylinux1_x86_64.whl (10.3 MB)
Collecting umap-learn>=0.3.10
  Using cached umap_learn-0.5.2-py3-none-any.whl
Collecting numba>=0.41.0
  Using cached numba-0.54.1-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (3.3 MB)
Collecting joblib
  Using cached joblib-1.1.0-py2.py3-none-any.whl (306 kB)
Collecting numpy>=1.17.0
  Using cached numpy-1.21.4-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (15.7 MB)
Collecting seaborn
  Using cached seaborn-0.11.2-py3-none-any.whl (292 kB)
Collecting natsort
  Using cached natsort-8.0.0-py3-none-any.whl (37 kB)
Collecting statsmodels>=0.10.0rc2
  Using cached statsmodels-0.13.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.9 MB)
Collecting networkx>=2.3
  Using cached networkx-2.6.3-py3-none-any.whl (1.9 MB)
Collecting tables
  Using cached tables-3.6.1-cp39-cp39-manylinux2010_x86_64.whl (14.3 MB)
Collecting tqdm
  Using cached tqdm-4.62.3-py2.py3-none-any.whl (76 kB)
Collecting patsy
  Using cached patsy-0.5.2-py2.py3-none-any.whl (233 kB)
Collecting scikit-learn>=0.22
  Using cached scikit_learn-1.0.1-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (24.7 MB)
Collecting packaging
  Using cached packaging-21.2-py3-none-any.whl (40 kB)
Collecting pandas>=0.21
  Using cached pandas-1.3.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.5 MB)
Collecting xlrd<2.0
  Using cached xlrd-1.2.0-py2.py3-none-any.whl (103 kB)
Collecting kiwisolver>=1.0.1
  Using cached kiwisolver-1.3.2-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.6 MB)
Collecting cycler>=0.10
  Using cached cycler-0.11.0-py3-none-any.whl (6.4 kB)
Collecting pyparsing>=2.2.1
  Using cached pyparsing-3.0.4-py3-none-any.whl (96 kB)
Collecting python-dateutil>=2.7
  Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting pillow>=6.2.0
  Using cached Pillow-8.4.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.1 MB)
Collecting llvmlite<0.38,>=0.37.0rc1
  Using cached llvmlite-0.37.0-cp39-cp39-manylinux2014_x86_64.whl (26.3 MB)
Collecting numpy>=1.17.0
  Using cached numpy-1.20.3-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (15.4 MB)
Collecting setuptools
  Using cached setuptools-58.5.3-py3-none-any.whl (946 kB)
Collecting pyparsing>=2.2.1
  Using cached pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)
Collecting pytz>=2017.3
  Using cached pytz-2021.3-py2.py3-none-any.whl (503 kB)
Collecting six>=1.5
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting threadpoolctl>=2.0.0
  Using cached threadpoolctl-3.0.0-py3-none-any.whl (14 kB)
Collecting pynndescent>=0.5
  Using cached pynndescent-0.5.5-py3-none-any.whl
Collecting stdlib-list
  Using cached stdlib_list-0.8.0-py3-none-any.whl (63 kB)
Collecting numexpr>=2.6.2
  Using cached numexpr-2.7.3-cp39-cp39-manylinux2010_x86_64.whl (471 kB)
Installing collected packages: numpy, threadpoolctl, six, setuptools, scipy, llvmlite, joblib, scikit-learn, pytz, python-dateutil, pyparsing, pillow, numba, kiwisolver, cycler, xlrd, tqdm, stdlib-list, pynndescent, patsy, pandas, packaging, numexpr, natsort, matplotlib, h5py, umap-learn, tables, statsmodels, sinfo, seaborn, networkx, anndata, scanpy
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
poetry 1.1.11 requires packaging<21.0,>=20.4, but you have packaging 21.2 which is incompatible.
Successfully installed anndata-0.7.6 cycler-0.11.0 h5py-3.5.0 joblib-1.1.0 kiwisolver-1.3.2 llvmlite-0.37.0 matplotlib-3.4.3 natsort-8.0.0 networkx-2.6.3 numba-0.54.1 numexpr-2.7.3 numpy-1.21.1 packaging-21.2 pandas-1.3.4 patsy-0.5.2 pillow-8.4.0 pynndescent-0.5.5 pyparsing-3.0.4 python-dateutil-2.8.2 pytz-2021.3 scanpy-1.8.2 scikit-learn-1.0.1 scipy-1.7.1 seaborn-0.11.2 setuptools-58.5.3 sinfo-0.3.4 six-1.16.0 statsmodels-0.13.0 stdlib-list-0.8.0 tables-3.6.1 threadpoolctl-3.0.0 tqdm-4.62.3 umap-learn-0.5.2 xlrd-1.2.0
Gino Mempin
  • 25,369
  • 29
  • 96
  • 135

1 Answers1

1

You could try installing all your packages in one line like this and see if the conflicts are resolved, pip install packaging scanpy. You could also try with your specific versions like this pip install packaging==20.9 scanpy==1.0 or whatever version you like. You can also try installing like this pip install package>=20.9 package2<1.9

You could also try using a package manager like conda or mamba, create a new environment and try installing the packages there. The package managers try to resolve conflicts like that.

anarchy
  • 3,709
  • 2
  • 16
  • 48