编程语言
首页 > 编程语言> > python – 无法卸载easy_install安装的软件包

python – 无法卸载easy_install安装的软件包

作者:互联网

我使用以下命令安装了模块beaver

easy_install Beaver

现在我需要从我的服务器中删除此包,并执行以下操作:

easy_install -m Beaver

但是程序包仍在系统中,我收到以下消息:

Searching for Beaver
Best match: Beaver 30

Using /usr/local/lib/python2.7/dist-packages

Because this distribution was installed --multi-version, before you can
import modules from this package in an application, you will need to
'import pkg_resources' and then use a 'require()' call similar to one of
these examples, in order to select the desired version:

    pkg_resources.require("Beaver")  # latest installed version
    pkg_resources.require("Beaver==30")  # this exact version
    pkg_resources.require("Beaver>=30")  # this version or higher

Processing dependencies for Beaver
Finished processing dependencies for Beaver

以下命令:

which beaver

向我展示了这个模块的路径

/usr/local/bin/beaver

帮我从系统中完全删除这个包

解决方法:

这是一个很好的答案:How do I remove packages installed with Python’s easy_install?

我认为安装pip并卸载此软件包更容易.就像上面的链接所说,你可以删除在你的站点包Python目录中很容易找到的包目录(但我真的更喜欢第一个选项).

pip uninstall Beaver

标签:python,ubuntu,easy-install
来源: https://codeday.me/bug/20190529/1176295.html