ImportError: No module named matplotlib.pyplot

Geeks, please accept the hero post of 2021 Microsoft x Intel hacking contest>>>

Instead of going to sklearn’s website, I’m going to compile the documents in GitHub

$ cd scikit-learn-master/doc
$ make html

the following error occurred:

Exception occurred:
  File "/home/sunlt/Downloads/scikit-learn-master/doc/sphinxext/gen_rst.py", line 850, in generate_file_rst
    import matplotlib.pyplot as plt
ImportError: No module named matplotlib.pyplot
The full traceback has been saved in /tmp/sphinx-err-7pCJ3k.log, if you want to report the issue to the developers.

Use pip install:

$ sudo pip install matplotlib

is still this error,

Use the following command to install, there is no problem:

$ sudo apt-get install python-matplotlib

Similar Posts: