title: 'ImportError: cannot import name cbook' when using PyCharm's Profiler
body: <p>I am trying to run the PyCharm profiler but I get the following error message:</p>
  
  <pre><code>Traceback (most recent call last):
    File "/home/b3053674/ProgramFiles/pycharm-2017.1.4/helpers/profiler/run_profiler.py", line 164, in &lt;module&gt;
      profiler.run(file)
    File "/home/b3053674/ProgramFiles/pycharm-2017.1.4/helpers/profiler/run_profiler.py", line 89, in run
      execfile(file, globals, globals)  # execute the script
    File "/home/b3053674/Documents/pycotools/pycotools/tasks.py", line 38, in &lt;module&gt;
      import viz,errors, misc, _base, model
    File "/home/b3053674/Documents/pycotools/pycotools/viz.py", line 53, in &lt;module&gt;
      import matplotlib.pyplot as plt
    File "/home/b3053674/anaconda2/envs/pycotools/lib/python2.7/site-packages/matplotlib/__init__.py", line 124, in &lt;module&gt;
      from . import cbook
  ImportError: cannot import name cbook
  Snapshot saved to /home/b3053674/.PyCharm2017.1/system/snapshots/pycotools30.pstat
  
  Process finished with exit code 1
  </code></pre>
  
  <p>I am using a conda environment which I have switched to in the terminal:</p>
  
  <pre><code>$ source activate &lt;env&gt;
  </code></pre>
  
  <p>then updated matplotlib</p>
  
  <pre><code>$pip install matplotlib --upgrade
  </code></pre>
  
  <p>and six just for good measure</p>
  
  <pre><code>$pip install six --upgrade
  </code></pre>
  
  <p>(note that I've also manually deleted these packages from site-directory of my environment and reinstalled just incase <code>--upgrade</code> wasn't behaving)</p>
  
  <p>I've looked <a href="https://stackoverflow.com/questions/26289473/pycharm-error-while-importing-matplotlib-pyplot-as-plt">here</a> and <a href="https://stackoverflow.com/questions/44623376/importerror-cannot-import-name-cbook">here</a> and neither solutions solved my problem. </p>
  
  <p>I've also switched the PyCharm <code>Run</code> configurations to use each of my conda environments in turn all of which produce the same error. </p>
  
  <p>Note that the profiler has worked before in the past and the code works fine when I use the normal way of executing the code. Does anybody have any idea of what is going on? </p>
  
  <p>Thanks</p>