I have downloaded an ipynb file from our tutorial and opened it with jupyter notebook.
When I ran this cell containing: import matplotlib.pyplot as plt
, I received an error something like module not found error.
I keyed in pip install matplotlib
in my terminal then tried to run the cell again but same error shows up. Then I tried to key in:
pip uninstall matplotlib
python -m pip install matplotlib
which I found from some Q&A here in the site then problem solved. I still need more detailed explanation for this. I just want to understand what is going on.
By the way if I key in which python
on my terminal (in my working directory), this is what I see:
Python 3.6.8 (v3.6.8:3c6b436a57, Dec 24 2018, 02:04:31) [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license" for more information.
>
and if which python
, I can see:
/usr/local/bin/python
I just want to understand more so I can set up my tutorial notebooks properly next time especially if I need to import some modules again. Thanks!