I am using Mac OSX 10.10.1. I generally use brew or pip to install everything. I noticed that my virtualenv was always grabbing all of my locally installed Python packages. I fixed this by deleting my $PYTHONPATH variable in my ~/.zshrc configuration file. This fixed the problem of the virtualenv grabbing all of my Python packages, but then IPython could not find things located in /usr/local/lib/python2.7/site-packages. I eventually found a way to fix the IPython problem by changing the hashbang line in /usr/local/bin/ipython to #!/usr/local/bin/ipython, as recommended in this SO post. As far as I can tell, everything is working fine now.
My question(s):
Is it best to install everything into
/Library/Python/2.7/site-packages? Or is it better to have half of your stuff in/usr/local/lib/python2.7/site-packages? It seems schizophrenic to have one's packages split up that way.Did I do the right thing by a) deleting my personally defined
$PYTHONPATHvariable, and b) changing the hashbang from#!/usr/bin/ipythonto#!/usr/local/bin/ipythonin the/usr/local/bin/ipythonfile? My$PYTHONPATHvariable to been set toexport PYTHONPATH="/usr/local/lib/python2.7/site-packages/":${PATH}in the~/.zshrcconfig file.