0

我安装了 rasa nlu 0.12.3 版。我遇到了一些问题并使用卸载了 rasa nlu 和其他要求

pip uninstall rasa_nlu
pip uninstall -r requirements.txt

现在,当我再次使用安装 rasa nlu 时pip install rasa_nlu

我在终端中看到以下消息

Error processing line 1 of /Users/uername/anaconda3/lib/python3.6/site-packages/matplotlib-2.0.2-py3.6-nspkg.pth:



     Traceback (most recent call last):
        File "/Users/username/anaconda3/lib/python3.6/site.py", line 168, in addpackage
          exec(line)
        File "<string>", line 1, in <module>
        File "<frozen importlib._bootstrap>", line 557, in module_from_spec
      AttributeError: 'NoneType' object has no attribute 'loader'

    Remainder of file ignored

There are more messages regarding installation and the final message is

    Found existing installation: greenlet 0.4.12
    Cannot uninstall 'greenlet'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

事实证明,rasa nlu 没有安装。我知道未安装 nlu,因为当我使用以下命令检查 nlu 版本时

python -c "import rasa_nlu; print(rasa_nlu.__version__);"

我收到错误

Error processing line 1 of /Users/username/anaconda3/lib/python3.6/site-packages/matplotlib-2.0.2-py3.6-nspkg.pth:



    Traceback (most recent call last):
        File "/Users/username/anaconda3/lib/python3.6/site.py", line 168, in addpackage
          exec(line)
        File "<string>", line 1, in <module>
        File "<frozen importlib._bootstrap>", line 557, in module_from_spec
      AttributeError: 'NoneType' object has no attribute 'loader'

    Remainder of file ignored
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
    ModuleNotFoundError: No module named 'rasa_nlu'
4

4 回答 4

1

Turns out the problem was happening due to a distutils installed project which the pip install couldn't uninstall before installation.

So I had to use --ignore-installed

In short, below command solved the problem

sudo pip install --ignore-installed rasa_nlu 
于 2018-05-19T05:19:44.603 回答
0
pip3 install rasa-x -U --extra-index-url https://pypi.rasa.com/simple

安装指南

于 2020-01-25T07:32:29.110 回答
0

正如 Rasa 的官方文档中提到的,安装它

pip3 install rasa-x --extra-index-url https://pypi.rasa.com/simple

它将安装 Rasa X 和 Rasa。它工作得很好。

于 2019-11-16T04:11:57.813 回答
0

如果要卸载作为 distutils 一部分的 python 包,可以手动从“site-packages”文件夹中删除该文件夹。如果是 Anaconda 发行版,它将在以下文件夹中。我建议剪切文件夹并将其粘贴到其他位置以进行备份。

在窗口中:

C:\Users\\AppData\Local\Continuum\Anaconda3\Lib\site-packages

我确信 Linux 会有类似的文件夹结构。

以下 2 项需要删除。

文件夹 [包版本号] 文件 - [包>.egg-info]

于 2018-08-14T02:17:31.953 回答