Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
187 views
in Technique[技术] by (71.8m points)

python - 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>appdatalocalprogramspythonpython36libsite-packages (from sanic~=19.9->rasa=
=1.6.0) (0.1.1)
Requirement already satisfied: aiofiles>=0.3.0 in c:users<USER>appdatalocalprogramspythonpython36libsite-packages (from sanic~=19.9->rasa==1
.6.0) (0.6.0)
ERROR: Exception:
Traceback (most recent call last):
  File "c:users<USER>appdatalocalprogramspythonpython36libsite-packagespip\_internalcliase_command.py", line 224, in _main
    status = self.run(options, args)
  File "c:users<USER>appdatalocalprogramspythonpython36libsite-packagespip\_internalcli
eq_command.py", line 180, in wrapper
    return func(self, options, args)
  File "c:users<USER>appdatalocalprogramspythonpython36libsite-packagespip\_internalcommandsinstall.py", line 321, in run
    reqs, check_supported_wheels=not options.target_dir
  File "c:users<USER>appdatalocalprogramspythonpython36libsite-packagespip\_internal
esolution
esolvelib
esolver.py", line 122, in resol
ve
    requirements, max_rounds=try_to_avoid_resolution_too_deep,
  File "c:users<USER>appdatalocalprogramspythonpython36libsite-packagespip\_vendor
esolvelib
esolvers.py", line 445, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File "c:users<USER>appdatalocalprogramspythonpython36libsite-packagespip\_vendor
esolvelib
esolvers.py", line 339, in resolve
    failure_causes = self._attempt_to_pin_criterion(name, criterion)
  File "c:users<USER>appdatalocalprogramspythonpython36libsite-packagespip\_vendor
esolvelib
esolvers.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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...