I need to use matplotlib in Python 3.1 under 32bit Windows. That would not be a problem if the version of py was different as there are many binaries of matplotlib for windows(py 3.4 + installed matplolib binary worked great). As I was not able to find a binary for py3.1 I decided to install matplotlib with the help of pip. The highest version to support py3.1 is matplotlib-1.2.1. After googling for a little bit I installed VS2008 and after that the installation successfully completed, however when I tried to plot a simple graph, nothing happened:
import matplotlib.pyplot as plt
plt.plot([1,2,3,4,5])
plt.show()
I found here that the problem may be in the default backend. I decided to fit my graph in a tkinter window but got the following mistake:
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python31\lib\site-packages\matplotlib\backends\backend_tkagg.py", lin
e 11, in <module>
import matplotlib.backends.tkagg as tkagg
File "C:\Python31\lib\site-packages\matplotlib\backends\tkagg.py", line 2, in
<module>
from matplotlib.backends import _tkagg
ImportError: cannot import name _tkagg
The solution of the error for Fedora and Ubuntu was given in the same topic, but I can not use it for windows. Other topic that I found has the solution only for different linux distributions too. I tried looking for tkinter development packages for windows but unsuccessfully. To be honest, I'm a noob and don't really undersand what a development package is (maybe some libraries or source codes?).
I would be very happy, if someone could help. Thanks in advance.