In my case, it turns out that matplotlib fails to load when it cannot import the dateutil
module during import of the agg backend. Running pvpython
and specifically importing the agg backend from matplotlib yields:
>>> import matplotlib.backends.backend_agg
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Program Files\ParaView 5.2.0-Qt4-OpenGL2-Windows-64bit\bin\lib\site-packages\matplotlib\backends\backend_agg.py", line 31, in <module>
from matplotlib.figure import Figure
File "C:\Program Files\ParaView 5.2.0-Qt4-OpenGL2-Windows-64bit\bin\lib\site-packages\matplotlib\figure.py", line 18, in <module>
from axes import Axes, SubplotBase, subplot_class_factory
File "C:\Program Files\ParaView 5.2.0-Qt4-OpenGL2-Windows-64bit\bin\lib\site-packages\matplotlib\axes.py", line 19, in <module>
import matplotlib.dates as mdates
File "C:\Program Files\ParaView 5.2.0-Qt4-OpenGL2-Windows-64bit\bin\lib\site-packages\matplotlib\dates.py", line 119, in <module>
from dateutil.rrule import rrule, MO, TU, WE, TH, FR, SA, SU, YEARLY, \
ImportError: No module named dateutil.rrule
Specifically importing dateutil
shows it is not installed:
>>> import dateutil
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named dateutil
Unfortunately, my pvpython
runs version 2.7.3 so pip
is not installed by default and i found installing pip
to be difficult with pvpython
in Windows 10. Instead, i downloaded python-dateutil 2.6.0
and extracted only the folder dateutil
from the zip archive into the pvpython library folder located at:
C:\Program Files\ParaView 5.2.0-Qt4-OpenGL2-Windows-64bit\bin\lib\site-packages\
Restarting Paraview then gave me a figure in the Python view instead of a black screen.