Python Forum
ModulNotFoundError matplotlib
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ModulNotFoundError matplotlib
#1
I'm new to Python and have installed Python 3.12.3 with idle on Windows 10. Having had fairly good success with other scripts, I decided to try to code a simple plot from example, I believe I have installed matplotlib, but I get an error message "ModuleNotFoundError: No module named 'matplotlib'"
Filename scatter_plot.py
Thanks,
Here's the script:

import matplotlib.pyplot as plt
import numpy as np

# Fixing random state for reproducibility
np.random.seed(19680801)


N = 50
x = np.random.rand(N)
y = np.random.rand(N)
colors = np.random.rand(N)
area = (30 * np.random.rand(N))**2  # 0 to 15 point radii

plt.scatter(x, y, s=area, c=colors, alpha=0.5)
plt.show()
Larz60+ write Apr-26-2024, 09:15 AM:
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Fixed for you this time. Please use BBCode tags on future posts.
Reply


Messages In This Thread
ModulNotFoundError matplotlib - by WicardBohnam - Apr-26-2024, 12:05 AM
RE: ModulNotFoundError matplotlib - by deanhystad - Apr-26-2024, 01:14 AM
RE: ModulNotFoundError matplotlib - by WicardBohnam - Apr-26-2024, 04:16 PM
RE: ModulNotFoundError matplotlib - by deanhystad - Apr-26-2024, 04:36 PM
RE: ModulNotFoundError matplotlib - by WicardBohnam - Apr-26-2024, 04:49 PM
RE: ModulNotFoundError matplotlib - by deanhystad - Apr-26-2024, 04:59 PM
RE: ModulNotFoundError matplotlib - by WicardBohnam - Apr-26-2024, 05:13 PM
RE: ModulNotFoundError matplotlib - by snippsat - Apr-26-2024, 05:07 PM
RE: ModulNotFoundError matplotlib - by snippsat - Apr-26-2024, 05:38 PM
RE: ModulNotFoundError matplotlib - by WicardBohnam - Apr-27-2024, 01:25 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Matplotlib: How do I convert Dates from Excel to use in Matplotlib JaneTan 1 4,243 Mar-11-2021, 10:52 AM
Last Post: buran

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020