I am having trouble using or importing matplotlib. This is the first line of my code: import matplotlib.pyplot as plt
<p>These are the messages I'm receiving and I have no idea what any of them mean.</p>

<p>I have <code>python 2.7.12</code> and have imported <code>matplotlib</code>.</p>

<p>In the command prompt window, the last update I installed was <strong>conda install matplotlib</strong> which seemed to update some stuff (<code>conda-env-2.5.2</code> and <code>conda-4.1.12</code>), but unfortunately not the stuff I needed.</p>

<p>I have never used any of this before so please speak in layman's terms if possible.</p>

<p>Traceback (most recent call last):</p>

<pre><code>  File "C:\Users\user\Desktop\plotting2.py", line 1, in &lt;module&gt;
    import matplotlib.pyplot as plt
  File "C:\Python27\lib\site-packages\matplotlib\pyplot.py", line 36, in &lt;module&gt;
    from matplotlib.figure import Figure, figaspect
  File "C:\Python27\lib\site-packages\matplotlib\figure.py", line 40, in &lt;module&gt;
    from matplotlib.axes import Axes, SubplotBase, subplot_class_factory
  File "C:\Python27\lib\site-packages\matplotlib\axes\__init__.py", line 4, in &lt;module&gt;
    from ._subplots import *
  File "C:\Python27\lib\site-packages\matplotlib\axes\_subplots.py", line 10, in &lt;module&gt;
    from matplotlib.axes._axes import Axes
  File "C:\Python27\lib\site-packages\matplotlib\axes\_axes.py", line 23, in &lt;module&gt;
    import matplotlib.dates as _  # &lt;-registers a date unit converter
  File "C:\Python27\lib\site-packages\matplotlib\dates.py", line 130, in &lt;module&gt;
    import dateutil.parser
  File "C:\Python27\lib\site-packages\dateutil\parser.py", line 38, in &lt;module&gt;
    from calendar import monthrange, isleap
ImportError: cannot import name monthrange
</code></pre>

<p>It looks like there may be a conflicting module named calendar. Are there any other packages (files) called "calendar" (<code>calendar.py</code>) in your python path? Try opening up a new python console and type <code>from calendar import monthrange</code>.</p>

python python-2.7 matplotlib