Unable to uninstall package installed by easy_install
我使用以下命令安装了模块beaver
1 | easy_install Beaver |
现在,我需要从服务器中删除此包,并执行以下操作:
1 | easy_install -m Beaver |
但包仍在系统中,我收到以下消息:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | 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 |
以下命令:
1 | which beaver |
显示此模块的路径
1 | /usr/local/bin/beaver |
帮助我从系统中完全删除此包
下面是一个很好的答案:如何删除用python的easy-install安装的包?
我认为安装PIP和卸载这个包更容易。正如上面的链接所说,您可以删除包目录,这个目录可以很容易地在站点包python目录中找到(但我确实更喜欢第一个选项)。
1 | pip uninstall Beaver |