matplotlib2tikz needs matplotlib and NumPy to work. matplotlib2tikz works both with Python 2 and Python 3.
Nevertheless, it doesn't work without pipdated (it's not clear why the it's needed for plotting, anyway) and Pillow:
from matplotlib2tikz import save as tikz_save
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-1-1cb291629c61> in <module>()
1 import matplotlib.pyplot as plt
2 import numpy as np
----> 3 from matplotlib2tikz import save as tikz_save
4
5 plt.style.use('ggplot')
/usr/lib/python3.6/site-packages/matplotlib2tikz/__init__.py in <module>()
18 from matplotlib2tikz.save import get_tikz_code, save
19
---> 20 import pipdated
21 if pipdated.needs_checking(__name__):
22 print(pipdated.check(__name__, __version__))
ModuleNotFoundError: No module named 'pipdated'
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-1-1cb291629c61> in <module>()
1 import matplotlib.pyplot as plt
2 import numpy as np
----> 3 from matplotlib2tikz import save as tikz_save
4
5 plt.style.use('ggplot')
/usr/lib/python3.6/site-packages/matplotlib2tikz/__init__.py in <module>()
16 )
17
---> 18 from matplotlib2tikz.save import get_tikz_code, save
19
20 import pipdated
/usr/lib/python3.6/site-packages/matplotlib2tikz/save.py in <module>()
11 from . import legend
12 from . import line2d
---> 13 from . import image as img
14 from . import quadmesh as qmsh
15 from . import path
/usr/lib/python3.6/site-packages/matplotlib2tikz/image.py in <module>()
5 import matplotlib as mpl
6 import numpy
----> 7 import PIL
8
9
ModuleNotFoundError: No module named 'PIL'
It is written that
Nevertheless, it doesn't work without
pipdated
(it's not clear why the it's needed for plotting, anyway) andPillow
: