Python:无法卸载';六个';当pip安装tld时
安装tld模块时出错,无法卸载现有的“六”模块Python:无法卸载';六个';当pip安装tld时,python,tld,six,Python,Tld,Six,安装tld模块时出错,无法卸载现有的“六”模块 $ pip install tld Collecting tld Using cached https://files.pythonhosted.org/packages/fa/78/dbeaeb20db795c42deb81271fd65a35c040ce2e946024eaeef5c6b184176/tld-0.9-py2.py3-none-any.whl Collecting six>=1.9 (from tld) Using
$ pip install tld
Collecting tld
Using cached https://files.pythonhosted.org/packages/fa/78/dbeaeb20db795c42deb81271fd65a35c040ce2e946024eaeef5c6b184176/tld-0.9-py2.py3-none-any.whl
Collecting six>=1.9 (from tld)
Using cached https://files.pythonhosted.org/packages/67/4b/141a581104b1f6397bfa78ac9d43d8ad29a7ca43ea90a2d863fe3056e86a/six-1.11.0-py2.py3-none-any.whl
Installing collected packages: six, tld
Found existing installation: six 1.4.1
Cannot uninstall 'six'. 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.
如果出现上述错误,请尝试以下命令安装six-1.11.0和tld-0.9
$pip安装tld--忽略已安装的六个--用户
用法:
pip安装tld——忽略已安装的六个
我在安装pytest时遇到同样的问题。。。似乎与莫哈韦osx有关。。。我已经通过以下方式修复了它:
- brew更新
- sudo安装程序-pkg/Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg-目标/
- brew重新安装python@2
升级Python2.7.16修复了我在Mojave的问题,谢谢。这应该是MacOs用户的首选答案
$ pip install tld
Collecting tld
Using cached https://files.pythonhosted.org/packages/fa/78/dbeaeb20db795c42deb81271fd65a35c040ce2e946024eaeef5c6b184176/tld-0.9-py2.py3-none-any.whl
Collecting six>=1.9 (from tld)
Using cached https://files.pythonhosted.org/packages/67/4b/141a581104b1f6397bfa78ac9d43d8ad29a7ca43ea90a2d863fe3056e86a/six-1.11.0-py2.py3-none-any.whl
Installing collected packages: six, tld
Found existing installation: six 1.4.1
Cannot uninstall 'six'. 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.
$ pip install tld --ignore-installed six --user
Collecting tld
Using cached https://files.pythonhosted.org/packages/fa/78/dbeaeb20db795c42deb81271fd65a35c040ce2e946024eaeef5c6b184176/tld-0.9-py2.py3-none-any.whl
Collecting six
Using cached https://files.pythonhosted.org/packages/67/4b/141a581104b1f6397bfa78ac9d43d8ad29a7ca43ea90a2d863fe3056e86a/six-1.11.0-py2.py3-none-any.whl
Installing collected packages: six, tld
Successfully installed six-1.11.0 tld-0.9