如何升级disutils软件包PyYAML? [英] How to upgrade disutils package PyYAML?
问题描述
我正在尝试安装 chatterbot ,该程序依赖于 PyYAML = 3.12 .在我的Ubuntu计算机上,安装的 PyYAML 版本是3.11.因此,我使用以下命令来升级 PyYAML :
I was trying to install chatterbot which has a dependency on PyYAML=3.12. In my Ubuntu machine installed PyYAML version is 3.11. So I used the following command to upgrade PyYAML:
sudo -H pip3 install --upgrade PyYAML
但是会出现以下错误:
无法卸载"PyYAML".这是一个distutils安装的项目, 因此我们无法准确确定哪些文件属于该文件 只会导致部分卸载.
Cannot uninstall 'PyYAML'. 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.
我的 pip3 版本是10.0.0.
My pip3 version is 10.0.0.
该如何解决?
推荐答案
在此Github问题中,我发现 pip 10不再卸载distutils软件包.因此我将等级降为8.1.1.现在就可以了.
I found in this Github issue that pip 10 no longer uninstalls distutils packages. So I downgraded to pip 8.1.1. And now it works.
如果正在查看此问题的任何人都知道如何使用pip 10.0.0卸载或升级 distutils 软件包,请在此告诉我. :)
If anybody, who are viewing this question, knows how to uninstall or upgrade distutils package with pip 10.0.0, please let me know here. :)
(如果有人需要)
为了降低点数,我使用了以下内容:
(If anybody needs)
And to downgrade pip, I used the following:
sudo -H pip3 install pip==8.1.1
sudo -H pip3 install pip==8.1.1
这篇关于如何升级disutils软件包PyYAML?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!