我安装了rasa nlu版本0.12.3。我遇到了一些问题,卸载了rasa nlu和其他要求,使用
pip uninstall rasa_nlu
pip uninstall -r requirements.txt现在,当我使用pip install rasa_nlu再次安装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'发布于 2018-05-19 13:19:45
原来这个问题是由于一个安装了distutils的项目导致的,在安装之前pip install无法卸载该项目。
所以我不得不使用--ignore-installed
简而言之,下面的命令解决了这个问题
sudo pip install --ignore-installed rasa_nlu 发布于 2018-08-14 10:17:32
如果你想卸载python包,它是distutils的一部分,你可以手动从'site-packages‘文件夹中删除文件夹。如果是Anaconda发行版,它将位于以下文件夹中。我建议剪切文件夹并将其粘贴到其他地方作为备份目的。
在windows中:
C:\Users\AppData\Local\Continuum\Anaconda3\Lib\site-packages
我相信Linux也会有类似的文件夹结构。
以下2个项目需要删除。
文件夹包版本号File - package>.egg-info
发布于 2019-11-16 12:11:58
正如Rasa的官方文档中所提到的,使用
pip3 install rasa-x --extra-index-url https://pypi.rasa.com/simple它将安装Rasa X和Rasa。它工作得很好。
https://stackoverflow.com/questions/50421922
复制相似问题