Python: Cannot uninstall 'six' while pip install tld
Asked Answered
I

3

45
$ 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.

When installing tld module getting error of cannot uninstall existing 'six' module.

Illustrious answered 20/6, 2018 at 17:44 Comment(0)
I
70
$ 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.

If you're getting above error, then try the following command to install six-1.11.0 and tld-0.9.

$ pip install tld --ignore-installed six --user

$ 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
Illustrious answered 20/6, 2018 at 17:44 Comment(0)
P
46

Use: pip install tld --ignore-installed six

Polysepalous answered 6/11, 2018 at 18:22 Comment(0)
O
13

I had the same issue installing pytest... seems is related to mojave osx... I´ve fixed it by doing:

  • brew update
  • sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
  • brew reinstall python@2
Offshoot answered 15/4, 2019 at 2:5 Comment(2)
upgrading python 2.7.16 fixed the issue for me in Mojave Thanks.Robb
This should be the preferred answer for MacOs usersMiculek

© 2022 - 2024 — McMap. All rights reserved.