All Courses

how to import 'matplotlib'

By, 3 months ago
  • Bookmark

how to import this  ModuleNotFoundError : No module named 'matplotlib'

Module matplotlib
2 Answers

Go to terminal

Type - pip install matplotlib and enter

After installing this library this error will not come


To import matplotlib, you will first need to install it. You can install the package using pip, the Python package manager.

To install matplotlib, open a terminal and enter the following command:

pip install matplotlib

This will install matplotlib and its dependencies. Once the installation is complete, you should be able to import matplotlib in your Python code using:

import matplotlib

If you are using a version of Python that is earlier than 3.4, you may need to use pip3 instead of pip to install the package.

pip3 install matplotlib

I hope this helps! Let me know if you have any other questions.

Your Answer


Live Masterclass on : "How Machine Get Trained in Machine Learning?"

Mar 30th (7:00 PM) 516 Registered
More webinars

Related Discussions

Running random forest algorithm with one variable

View More