I am trying to write a blender script for which I need matplotlib.pyplot. When trying to import matplotlib.pyplot as plt I get the following error:
ImportError: No module named 'tkinter'
However, using the installed anaconda version, the import is no problem. The common solution to run
sudo apt-get install python3-tk
does not solve the problem.
I tried to add the Path to tkinter with:
sys.path.append('/usr/lib/python3.4/tkinter/')
sys.path.append('/home/<username>/anaconda3/lib/python3.6/tkinter/')
Both commands did not resolve the error.