Unable to upgrade python six package in mac osx 10.10.2

Anish picture Anish · Apr 7, 2015 · Viewed 40.3k times · Source

I am trying to install latest version of six python package but I have following issues. Can't get rid of six 1.4.1 in mac OSX 10.10.2

sudo pip install six --upgrade
Requirement already up-to-date: six in /Library/Python/2.7/site-packages
Cleaning up...

pip search six
six - Python 2 and 3 compatibility utilities
INSTALLED: 1.9.0 (latest)

python -c "import six; print six.version"
1.4.1

which -a python
/usr/bin/python
which -a pip
/usr/local/bin/pip

What is wrong here? Can't upgrade six!

Answer

kellyxiepei picture kellyxiepei · May 4, 2016

I resolved the problem by the following method.

  1. Download the six-1.10.0.tar.gz package
  2. Use this command to install it.

python setup.py install

This works because it installs the new version of six to /Library/Python/2.7/site-packages/ which is searched before /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/