Search code examples
pythonpippython-3.6rasasanic

Rasa installation Requirement Incompatible


I have a laptop with Windows 10 Pro and I'm trying to install Rasa 1.6.0

When I try to run the command pip install rasa==1.6.0 --no-cache-dir, I get the following error:

Collecting sanic~=19.9
  Downloading sanic-19.12.4-py3-none-any.whl (73 kB)
     |████████████████████████████████| 73 kB 5.1 MB/s
  Downloading sanic-19.12.3-py3-none-any.whl (72 kB)
     |████████████████████████████████| 72 kB 2.6 MB/s
  Downloading sanic-19.12.2-py3-none-any.whl (72 kB)
     |████████████████████████████████| 72 kB 5.1 MB/s
Requirement already satisfied: httptools>=0.0.10 in c:\users\<USER>\appdata\local\programs\python\python36\lib\site-packages (from sanic~=19.9->rasa=
=1.6.0) (0.1.1)
Requirement already satisfied: aiofiles>=0.3.0 in c:\users\<USER>\appdata\local\programs\python\python36\lib\site-packages (from sanic~=19.9->rasa==1
.6.0) (0.6.0)
ERROR: Exception:
Traceback (most recent call last):
  File "c:\users\<USER>\appdata\local\programs\python\python36\lib\site-packages\pip\_internal\cli\base_command.py", line 224, in _main
    status = self.run(options, args)
  File "c:\users\<USER>\appdata\local\programs\python\python36\lib\site-packages\pip\_internal\cli\req_command.py", line 180, in wrapper
    return func(self, options, args)
  File "c:\users\<USER>\appdata\local\programs\python\python36\lib\site-packages\pip\_internal\commands\install.py", line 321, in run
    reqs, check_supported_wheels=not options.target_dir
  File "c:\users\<USER>\appdata\local\programs\python\python36\lib\site-packages\pip\_internal\resolution\resolvelib\resolver.py", line 122, in resol
ve
    requirements, max_rounds=try_to_avoid_resolution_too_deep,
  File "c:\users\<USER>\appdata\local\programs\python\python36\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 445, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File "c:\users\<USER>\appdata\local\programs\python\python36\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 339, in resolve
    failure_causes = self._attempt_to_pin_criterion(name, criterion)
  File "c:\users\<USER>\appdata\local\programs\python\python36\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 221, in _attempt_to_pin_c
riterion
    raise InconsistentCandidate(candidate, criterion)
pip._vendor.resolvelib.resolvers.InconsistentCandidate: Provided candidate LinkCandidate('https://files.pythonhosted.org/packages/90/54/17f1e496599214de
de67e37e019ce2f210b7861d2dd39b92ac4d3d08e83a/sanic-19.12.2-py3-none-any.whl#sha256=18350ed6e264631260044f6253f139f1ac83c4ce8a0202ec900ec5b50c5370ab (fro
m https://pypi.org/simple/sanic/) (requires-python:>=3.6)') does not satisfy SpecifierRequirement('sanic~=19.9'), SpecifierRequirement('sanic>=0.8.3'),
SpecifierRequirement('sanic~=19.9.0')

Apparently, the library sanic 19.12.2 is being installed and later on the proccess, there's a requirement SpecifierRequirement('sanic~=19.9'), SpecifierRequirement('sanic>=0.8.3'), SpecifierRequirement('sanic~=19.9.0') which should make sanic 19.12.2 compatible. I'm not specifying any library version anywhere, so I'm assuming this is some background requirement from Rasa.

This is the result of pip freeze:

aiofiles==0.6.0
certifi==2020.12.5
click==7.1.2
contextvars==2.4
h11==0.9.0
httpcore==0.11.1
httptools==0.1.1
httpx==0.15.4
idna==3.1
immutables==0.14
itsdangerous==1.1.0
Jinja2==2.11.2
MarkupSafe==1.1.1
multidict==4.7.6
Python-dev==2.0.0.dev0
rfc3986==1.4.0
sniffio==1.2.0
websockets==5.0.1
Werkzeug==1.0.1

My Python version is 3.6.5 and pip is on version 20.3.3

Do you have any idea how I can solve this problem ?

Thanks in advance !

_____________________________________________________________________________

EDIT:

Already tried to uninstall python and pip and install them again, but it didn't solve the problem.


Solution

  • Solved it. The problem was that I assumed the ~= in sanic~=19.9.0 meant that sanic version should be different from 19.9.0, when in fact it means the version should be the latest version of the package, greater than or equal to 19.9.0, but still in the 19.9.* "range" (according to this accepted answer). And this makes sanic 19.12.2 incompatible.

    Tried pip install sanic~=19.9.0 before installing Rasa 1.6.0 and it solved the problem.