I am using Ubuntu 16.04 and Python 2.7, and I have set up a virtual environment (virtualenv) using a pypy interpreter. I even installed succeffully the matplotlib library.
However, we it comes to using it on my own code I get this error messagge:
Traceback (most recent call last):
File "my_script.py", line 20, in import matplotlib.pyplot as plt
File "/home/.../venv/site-packages/matplotlib/pyplot.py", line 115, in _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
File "/home/.../venv/site-packages/matplotlib/backends/init.py", line 32, in pylab_setup globals(),locals(),[backend_name],0)
File "/home/.../venv/site-packages/matplotlib/backends/backend_tkagg.py", line 13, in import matplotlib.backends.tkagg as tkagg
File "/home/.../venv/site-packages/matplotlib/backends/tkagg.py", line 9, in from matplotlib.backends import _tkagg RuntimeError: Cannot dlopen tkinter module file
What can I do to fix it?
EDIT: The solution proposed here is the same, but I think that the problem (pypy and matplotlib) and the error message are quite different.