title: Importing matplotlib.pyplot fails in PyCharm due to AttributeError: module 'PyQt5.QtGui' has no attribute 'QApplication'
body: <p>I wanted to change my python compiler to "newer"  one (within one project) and use some additional packages with conda. After the installation all my packages worked fine and I could use the console, however matplotlib.pyplot fails to import since then. And throws the following error: <code>app = QtGui.QApplication([" "])
  AttributeError: module 'PyQt5.QtGui' has no attribute 'QApplication'</code></p>
  
  <p>After doing some research on this I found this one: <a href="https://youtrack.jetbrains.com/issue/PY-27685" rel="nofollow noreferrer">link</a>
  It is suggesting to change inputhooks.py (on line 513 and change <code>GUI_QT:enable_qt4</code> to <code>GUI_QT: enable_qt5</code> 4 to 5)
  As it is a company machine, I can't have admin rights to overwrite things within PyCharm. </p>
  
  <p>Can you recommend a better solution to avoid this? </p>
  
  <p>Why is this popping up?
  <a href="https://i.stack.imgur.com/qTul0.png" rel="nofollow noreferrer">ErrorLogScreenshot</a></p>
  
  <p>Also I tried to install the newer version of pyqt but that didn't fix the problem. </p>
  
  <p>In the same time 
  Within pydev the interactiveshell.py fails as well. with the following error message:<code>self.showtraceback(running_compiled_code=True)
  TypeError: showtraceback() got an unexpected keyword argument 'running_compiled_code'</code>
  I understand it gets an argument which it is not expecting. I did some research on this one as well and some could fix it by deleting a stale a corresponding .pyc file (I couldn't find one at the same location as the initial file only interactiveshell.py)</p>
  
  <p>Below this blog regarding pydev the conversation never went further
  <a href="https://github.com/ipython/ipython/issues/10687" rel="nofollow noreferrer">https://github.com/ipython/ipython/issues/10687</a></p>
  
  <p>Is there a way to fix it? 
  I am kind of new to Python and don't quite understand the heart of it at this depth so any help is appreciated.</p>
  
  <p>Thanks,
  Anna</p>