Help us understand the problem. What is going on with this article?

AWS EC2インスタンス上でmatplotloibでimport Error

More than 1 year has passed since last update.


    import matplotlib.pyplot as plt
  File "/home/ec2-user/anaconda3/lib/python3.6/site-packages/matplotlib/", line 115, in <module>
    _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
  File "/home/ec2-user/anaconda3/lib/python3.6/site-packages/matplotlib/backends/", line 62, in pylab_setup
    [backend_name], 0)
  File "/home/ec2-user/anaconda3/lib/python3.6/site-packages/matplotlib/backends/", line 15, in <module>
    from .backend_qt5 import (
  File "/home/ec2-user/anaconda3/lib/python3.6/site-packages/matplotlib/backends/", line 19, in <module>
    import matplotlib.backends.qt_editor.figureoptions as figureoptions
  File "/home/ec2-user/anaconda3/lib/python3.6/site-packages/matplotlib/backends/qt_editor/", line 20, in <module>
    import matplotlib.backends.qt_editor.formlayout as formlayout
  File "/home/ec2-user/anaconda3/lib/python3.6/site-packages/matplotlib/backends/qt_editor/", line 54, in <module>
    from matplotlib.backends.qt_compat import QtGui, QtWidgets, QtCore
  File "/home/ec2-user/anaconda3/lib/python3.6/site-packages/matplotlib/backends/", line 140, in <module>
    from PyQt5 import QtCore, QtGui, QtWidgets
ImportError: cannot open shared object file: No such file or directory



import matplotlib
import matplotlib.pyplot as plt
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away