After experiencing this brew issue with sqlite3, I did
brew rm sqlite python python3
then
brew install python python3
The python3 homebrew package installs pip as pip3. You can even install multiple versions of python 3, e.g. python 3.2 and 3.3 and each will get linked as pip-3.3 and pip-3.2.
I would install Python 2.7 form the project's page, and later use pip
to install all other packages from within virtualenv. It works for me.
If you are working on a cluster and cannot (and should not) access the root directory: /usr/local/share/python/pip
, you should look in your home directory instead: $HOME/.local/bin/pip
. Check that the proper python location is referenced there.
It sounds like your /usr/local/share/python/pip
is pointing to the wrong version of Python. Check the first line of that file, and if it looks like...
#!/usr/local/Cellar/python/2.7.3/bin/python
...then you'll need to change it to point to the correct version of Python.