1

I am getting this error when using pip to install from a requirements file.

C:\Users\keerthi\AppData\Local\Programs\Python\Python36\healthcare\Ai-Healthcare-Chatbot-master>pip install -r requirements.txt
Collecting Flask==0.12.3
  Using cached Flask-0.12.3-py2.py3-none-any.whl (88 kB)
Requirement already satisfied: chatterbot==0.8.4 in c:\users\keerthi\appdata\local\programs\python\python36\lib\site-packages (from -r requirements.txt (line 5)) (0.8.4)
Requirement already satisfied: SQLAlchemy==1.1.11 in c:\users\keerthi\appdata\local\programs\python\python36\lib\site-packages (from -r requirements.txt (line 6)) (1.1.11)
Collecting gunicorn==19.10.0
  Using cached gunicorn-19.10.0-py2.py3-none-any.whl (113 kB)
ERROR: Cannot install SQLAlchemy==1.1.11 and chatterbot==0.8.4 because these package versions have conflicting dependencies.


The conflict is caused by:
    The user requested SQLAlchemy==1.1.11
    chatterbot 0.8.4 depends on sqlalchemy<1.3 and >=1.2

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies
Community
  • 1
  • 1

1 Answers1

2

One way that works for now is to use the legacy resolver. You can get the legacy resolver by (1) downgrading pip, or (2) using the --use-deprecated flag.

Using an older pip version

I know that pip==20.1.1 uses the old resolver, you could downgrade to that version.

pip install pip==20.1.1

Using the --use-deprecated flag

You can also use the legacy resolver with newer versions of pip with this flag (I tested this with pip==22.3.1).

pip install --use-deprecated=legacy-resolver .......

(took me forever to find this flag, btw)

bitoffdev
  • 3,134
  • 1
  • 13
  • 16