Over the past couple years I've pip installed
lots of things without knowing what I was doing. All of a sudden, I am getting this error when I run a snippet in a Python 2.7 Jupyter Notebook:
ImportError: No module named matplotlib
When I run this in Terminal: which -a python python 3
... I get:
Sams-MacBook-Pro-2:~ sambrand$ which -a python python3
//anaconda/bin/python
/usr/local/bin/python
/usr/bin/python
/usr/local/bin/python
I think this is showing that I have Python in a few places, which might explain why my standard libraries (eg. matplotlib) aren't being found in the Python environment that I want to use.
My ideal result:
Ultimately, I just want to clean up my environment and start from scratch so that I can use Keras, Tensorflow, and all Anaconda packages with Python 3 as my default when I open a Jupyter Notebook.
Additionally, I'd like any subsequent pip install
from the terminal to update what I'm using in Jupyter.
From what I gather, this kind of bewilderment about Python environment is a fairly common issue, so I hope this post proves helpful.