I have a very similar question to this one: matplotlib does not show my drawings although I call pyplot.show()
I am using: Ubuntu 12.04; Python 3.4.1; Pycharm 3.4.1
So, I run the following code in pyCharm using 3.4.1 interpreter and plot doesn't appear:
import matplotlib.pyplot as p
p.plot(range(20), range(20))
p.show()
Then I thought it could be something with pycharm, therefore I have tried the same in the terminal. However, plot didn't appear too.
However, since Ubuntu is with built-in Python 2.7, I have tried the same on terminal, then on pycharm and plot did appear.
I have found out that backend in matplotlibrc file should be changed. I googled, that qt4agg backend should be used. After changing it and trying to import matplotlib.pyplot I get the following
import matplotlib.pyplot as p
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/usr/local/lib/python3.4/dist-packages/matplotlib/pyplot.py", line 98, in <module>
_backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
File "/usr/local/lib/python3.4/dist-packages/matplotlib/backends/__init__.py", line 28, in pylab_setup
globals(),locals(),[backend_name],0)
File "/usr/local/lib/python3.4/dist-packages/matplotlib/backends/backend_qt4agg.py", line 13, in <module>
from .backend_qt4 import QtCore, QtGui, FigureManagerQT, FigureCanvasQT,\
File "/usr/local/lib/python3.4/dist-packages/matplotlib/backends/backend_qt4.py", line 25, in <module>
from .qt4_compat import QtCore, QtGui, _getSaveFileName, __version__
File "/usr/local/lib/python3.4/dist-packages/matplotlib/backends/qt4_compat.py", line 36, in <module>
import sip
ImportError: No module named 'sip'
Therefore, I installed sip using
sudo apt-get install python3-sip
and the same error appears.
I am trying to find out whats wrong with SIP. However, I am kinda confused, any help would be appreciated. Thanks