Time Series Visualizer Error - Matplotlib

Tell us what’s happening:
Can anyone assist? I am getting this error

import matplotlib.pyplot as plt
ModuleNotFoundError: No module named ‘matplotlib’

Thanks in advance for the assistance.

Where are you running this code?
This error means that you dont have the MatplotLib installed in the machine you are trying to run it.

replit.com as I did with every other project.
I deleted my first project, reactivated a ‘new starter code’ re-entered the code solutions where applicable taking extra care and did not edit the existing lines at all but keeps throwing out the error.

Perhaps I should have been clearer that it is in the Data Analysis with Python Projects that works on Replit Starter Code downloads.

This is strange. Is there any code using Matplotlib that actually works?

BTW is it possible for you to post the link to your code?

This is my current page, I periodically run the code replit to see if I am on track even tho it shows no errors in Jupyter.
Doesnt matter till which ‘stage’ line I add code in replit or if I re download it keeps throwing out the error.

import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sns
from pandas.plotting import register_matplotlib_converters

df = pd.read_csv(‘fcc-forum-pageviews.csv’, index_col=‘date’, parse_dates=True)

df = df[
(df[‘value’] <= df[‘value’].quantile(0.025)) &
(df[‘value’] >= df[‘value’].quantile(0.975))]

plt.title('Daily freeCodeCamp Forum Page Views 5/2016-12/2019')
plt.ylabel('Page Views')

It seems something changed in replit - see this thread for a pssible solution.

tell me txt88 if i look at the test_module.py it imports matplotlib as mpl (I did not change this must be a typo by the creator) will that have anything to do with my issue?

That did the trick!
Thanks KittyMac

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.