0

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.

João Amorim
  • 61
  • 1
  • 5

4 Answers4

1

Since this is running on an old version of Rasa, I'd suggest doing the installation inside of the virtual environment to make sure that the dependencies you are installing are not clashing with the dependencies that are already installed on your system.

I'd still second the other suggestions of using the newer version of Rasa (upgrading the project to 2.x) since there were lots of changes and improvements made to the library since the release of Rasa 1.6.0

Juste
  • 246
  • 1
  • 3
  • Agreed. As one of the Sanic maintainers, I would suggest using newer version. I'm not sure what Rasa 2.x is pinned to, but 19.9 is not a supported version any more. – Adam Hopkins Jan 08 '21 at 14:22
1

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.

João Amorim
  • 61
  • 1
  • 5
0

You're trying to install an old version of Rasa, one that currently isn't supported anymore and which therefore can have incompatible dependencies. At the time of writing Rasa is at version 2.2 and it's best to install via;

python -m pip install rasa

If you're in a virtualenv when you run this command you'll be sure that it is being installed correctly. In case you're interested there's a youtube installation guide here.

cantdutchthis
  • 31,949
  • 17
  • 74
  • 114
0

i also faced this issue and found out that you have to install sanic as below:

pip install sanic==19.9.0

The point here is that if you do pip install sanic==19.9 then it doesnt work and again gives the same error that you are facing

once you have installed the "sanic==19.9.0" then you can proceed and install

pip install rasa==1.6.0 --no-cache-dir
Sachin Rajput
  • 238
  • 7
  • 26