Python Forum
problem with Matplotlib - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Homework (https://python-forum.io/forum-9.html)
+--- Thread: problem with Matplotlib (/thread-28001.html)



problem with Matplotlib - AOCL1234 - Jun-30-2020

When I try to generate a plot (via Matplotlib), the output is as follows:

import matplotlib.pyplot as plt
ModuleNotFoundError: No module named 'matplotlib'

I checked via my terminal whether or not I have pip. I do:

pip 20.1 from /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pip (python 3.8)

Does anyone have any suggestions?


RE: problem with Matplotlib - Gribouillis - Jun-30-2020

First type this in a terminal

Output:
pip install -U matplotlib
Wait until the install is completed.


RE: problem with Matplotlib - AOCL1234 - Jul-02-2020

Hi Gribouillis,

All in all, the download is complete. I received a warning output message, however, in reference to the pip version I currently have (i.e. 20.1). Should I be concerned about this? Is it necessary to download the most recent version (i.e. 20.1.1)? Below is what appeared in my terminal. Thank you!

Output:
Collecting matplotlib Downloading matplotlib-3.2.2-cp38-cp38-macosx_10_9_x86_64.whl (12.5 MB) |████████████████████████████████| 12.5 MB 5.3 MB/s Requirement already satisfied, skipping upgrade: numpy>=1.11 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from matplotlib) (1.18.4) Collecting pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 Downloading pyparsing-2.4.7-py2.py3-none-any.whl (67 kB) |████████████████████████████████| 67 kB 4.8 MB/s Collecting cycler>=0.10 Downloading cycler-0.10.0-py2.py3-none-any.whl (6.5 kB) Collecting python-dateutil>=2.1 Downloading python_dateutil-2.8.1-py2.py3-none-any.whl (227 kB) |████████████████████████████████| 227 kB 7.3 MB/s Collecting kiwisolver>=1.0.1 Downloading kiwisolver-1.2.0-cp38-cp38-macosx_10_9_x86_64.whl (60 kB) |████████████████████████████████| 60 kB 4.8 MB/s Collecting six Downloading six-1.15.0-py2.py3-none-any.whl (10 kB) Could not build wheels for numpy, since package 'wheel' is not installed. Installing collected packages: pyparsing, six, cycler, python-dateutil, kiwisolver, matplotlib Successfully installed cycler-0.10.0 kiwisolver-1.2.0 matplotlib-3.2.2 pyparsing-2.4.7 python-dateutil-2.8.1 six-1.15.0 WARNING: You are using pip version 20.1; however, version 20.1.1 is available. You should consider upgrading via the '/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -m pip install --upgrade pip' command.



RE: problem with Matplotlib - Gribouillis - Jul-02-2020

No, upgrading pip from version 20.1 to 20.1.1 may not be the most urgent thing to do.


RE: problem with Matplotlib - AOCL1234 - Jul-03-2020

OK. I did research into BBcode and will do my best to use tags correctly in my future posts. Thank you.