擅长:python、mysql、java
<p>因为运行<code>pip uninstall <package></code>的pip 8.0.0在<code><package></code>是操作系统预先安装的(可能是python setup.py安装)时不起作用。</p>
<p>错误消息是:</p>
<blockquote>
<p>Detected a distutils installed project ('<code><package></code>') which we cannot uninstall. The metadata provided by distutils does not contain a list of files which have been installed, so pip does not know which files to uninstall.</p>
</blockquote>
<p>您需要使用OS包管理器来代替pip来卸载这些包。</p>
<p>所以在Ubuntu上:<code>sudo apt-get remove python-<package></code>会删除它。</p>
<p>我发现有两个包有这个问题:<strong>httplib2</strong>和<strong>six</strong>,上面的技巧帮助我克服了这个错误。希望其他人觉得这有用。</p>