As we all know, Mac OS comes with its own pre-installed python.
The recommendation is to leave this alone and use homebrew to install new python on the system.
My problem is that after installing python (and pip) using homebrew, pip installs packages into Mac OS site packages instead of my own. I confirmed that I am running a homegrown pip:
$ which pip /usr/local/bin/pip
But then when I try to install something that I can, it installs at:
/lib/python2.7/site-packages
The pip should be installed in /usr/local/lib/python2.7/site-packages , if I do not miss something to understand.
Surprisingly, checking with -V gives an amazing result:
pip -V pip 7.1.0 from /usr/local/lib/python2.7/site-packages (python 2.7)
Starting pip list right after starting pip install does not display the packages that were supposedly installed by it, but got into the wrong site packages.
Adding to this, packages installed on /lib/python2.7/site-packages are not recognized by my $ PYTHONPATH, and therefore I cannot use them.
To add even more confusion, I decided to use virtualenv, but I was amazed that even using pip with active virtualenv, it continued to install in /lib/python2.7/site-packages instead of virtual package sites.
So, somehow I ended up in a home pip that installs packages outside the homebrew sites and the python interpreter, which cannot use the packages installed in pip.
How do you recommend me find the root cause and have a smooth python experience? :)