When I run sudo pip install --upgrade six
I run into the issue below:
2016-01-20 18:29:48|optim $ sudo pip install --upgrade six
Collecting six
Downloading six-1.10.0-py2.py3-none-any.whl
Installing collected packages: six
Found existing installation: six 1.4.1
Detected a distutils installed project ('six') 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.
I have Python 2.7, and I'm on Mac OS X 10.11.1.
How can I make this upgrade successful?
(There are other kind of related posts, but they do not actually have a solution to this same error.)
EDIT:
I am told I can remove six
manually by removing things from site-packages
. These are the files in site-packages
that begin with six
:
six-1.10.0.dist-info
, six-1.9.0.dist-info
, six.py
, six.py
.
Are they all correct/safe to remove?
EDIT2:
I decided to remove those from site-packages
, but it turns out the existing six
that cannot be installed is actually in
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python
.
There I see the files:
six-1.4.1-py2.7.egg-info
, six.py
, six.pyc
but doing rm
on them (with sudo
, even) gives Operation not permitted
.
So now the question is, how can I remove those files, given where they are?