【发布时间】:2020-12-22 12:09:15
【问题描述】:
我一直在尝试在我的 Window 10 机器上安装 rasa。但到目前为止还没有成功。环境方面我有 python 3.7,pip 20.3。当我在 anaconda powershell 上提供 pip install rasa==1.7.0 时,下载依赖项需要很长时间,最后出现以下错误:
ERROR: Exception:
Traceback (most recent call last):
File "C:\Users\user\Anaconda3\envs\py37\lib\site-packages\pip\_internal\cli\base_command.py", line 224, in _main
status = self.run(options, args)
File "C:\Users\user\Anaconda3\envs\py37\lib\site-packages\pip\_internal\cli\req_command.py", line 180, in wrapper
return func(self, options, args)
File "C:\Users\user\Anaconda3\envs\py37\lib\site-packages\pip\_internal\commands\install.py", line 321, in run
reqs, check_supported_wheels=not options.target_dir
File "C:\Users\user\Anaconda3\envs\py37\lib\site-packages\pip\_internal\resolution\resolvelib\resolver.py", line 122, in resolve
requirements, max_rounds=try_to_avoid_resolution_too_deep,
File "C:\Users\user\Anaconda3\envs\py37\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 445, in resolve
state = resolution.resolve(requirements, max_rounds=max_rounds)
File "C:\Users\user\Anaconda3\envs\py37\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 325, in resolve
for item in self.state.criteria.items()
File "C:\Users\user\Anaconda3\envs\py37\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 326, in <listcomp>
if not self._is_current_pin_satisfying(*item)
File "C:\Users\user\Anaconda3\envs\py37\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 193, in _is_current_pin_satisfying
for r in criterion.iter_requirement()
AttributeError: 'NoneType' object has no attribute 'iter_requirement'
我无法找到有关此的详细信息。由于依赖项已经花费了很多时间,我遇到了New resolver takes time 文章,其中指出 pip 20.3 需要更多时间。解决它的一种方法是提供我不确定的确切版本的依赖项,因为这对 rasa 来说是个新手。我尝试使用较旧的解析器作为 pip install rasa==1.7.0 --use-deprecated=legacy-resolver。一段时间后它错误如下:
ERROR: Could not find a version that satisfies the requirement jaxlib>=0.1.51 (from dopamine-rl->tensor2tensor~=1.14.0->rasa==1.7.0) (from versions: none)
ERROR: No matching distribution found for jaxlib>=0.1.51 (from dopamine-rl->tensor2tensor~=1.14.0->rasa==1.7.0)
要解决这个问题:我按照here 的建议安装了不同版本的多巴胺,因为我不确定要使用哪个版本。包开始下载,最后出现依赖冲突错误,由于使用旧版解析器而发生。
ERROR: pip's legacy dependency resolver does not consider dependency conflicts when selecting packages. This behaviour is the source of the following dependency conflicts.
tensorflow-metadata 0.26.0 requires absl-py<0.11,>=0.9, but you'll have absl-py 0.11.0 which is incompatible.
kfac 0.2.3 requires tensorflow-probability==0.8, but you'll have tensorflow-probability 0.7.0 which is incompatible.
如果我们使用新的解析器,那么解析依赖项会花费大量时间。此外,我们不确定需要下载所有依赖版本才能对其进行微调。
这里的任何帮助指针将不胜感激。
更新
我绑定了以下命令序列:
pip install dopamine-rl==3.0.1
pip install absl-py>=0.9
pip install rasa==1.7.0 --use-deprecated=legacy-resolver
Rasa 已安装。在此之后安装 tensor-flow 为 conda install tensorflow==1.15.0。现在尝试检查 tensorflow 版本时,收到以下警告和错误。
The TensorFlow Distributions library has moved to TensorFlow Probability (https://github.com/tensorflow/probability). You should update all references to use `tfp.distributions` instead of `tf.distributions`.
ImportError: cannot import name 'Layer' from 'tensorflow.python.keras.engine.base_layer' (C:\Users\user\Anaconda3\envs\py37\lib\site-packages\tensorflow_core\python\keras\engine\base_layer.py)
【问题讨论】:
标签: python python-3.x anaconda rasa