When i try to run a piece of code which will just basicilly animate the chaos equation(i know it sounds a lot mathhy ) it gives me this error
Traceback (most recent call last):
File "/home/ayu/b.py", line 4, in
import matplotlib.pyplot as plt
File "/usr/local/lib/python3.10/site-packages/matplotlib/pyplot.py", line 2230, in
switch_backend(rcParams["backend"])
File "/usr/local/lib/python3.10/site-packages/matplotlib/pyplot.py", line 267, in switch_backend
class backend_mod(matplotlib.backend_bases._Backend):
File "/usr/local/lib/python3.10/site-packages/matplotlib/pyplot.py", line 268, in backend_mod
locals().update(vars(importlib.import_module(backend_name)))
File "/usr/local/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/usr/local/lib/python3.10/site-packages/matplotlib/backends/backend_tkagg.py", line 1, in
from . import _backend_tk
File "/usr/local/lib/python3.10/site-packages/matplotlib/backends/_backend_tk.py", line 7, in
import tkinter as tk
File "/usr/local/lib/python3.10/tkinter/init.py", line 37, in
import _tkinter # If this fails your Python may not be configured for Tk
ModuleNotFoundError: No module named '_tkinter'
Traceback (most recent call last):
File "/home/ayu/b.py", line 4, in
import matplotlib.pyplot as plt
File "/usr/local/lib/python3.10/site-packages/matplotlib/pyplot.py", line 2230, in
switch_backend(rcParams["backend"])
File "/usr/local/lib/python3.10/site-packages/matplotlib/pyplot.py", line 267, in switch_backend
class backend_mod(matplotlib.backend_bases._Backend):
File "/usr/local/lib/python3.10/site-packages/matplotlib/pyplot.py", line 268, in backend_mod
locals().update(vars(importlib.import_module(backend_name)))
File "/usr/local/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/usr/local/lib/python3.10/site-packages/matplotlib/backends/backend_tkagg.py", line 1, in
from . import _backend_tk
File "/usr/local/lib/python3.10/site-packages/matplotlib/backends/_backend_tk.py", line 7, in
import tkinter as tk
File "/usr/local/lib/python3.10/tkinter/init.py", line 37, in
import _tkinter # If this fails your Python may not be configured for Tk
ModuleNotFoundError: No module named '_tkinter'
It says here: # If this fails your Python may not be configured for Tk. So this is not a Matplotlib issue. You should be able to trigger it just by doing
ayush-india commentedMar 2, 2022
•
edited
Bug summary
When i try to run a piece of code which will just basicilly animate the chaos equation(i know it sounds a lot mathhy ) it gives me this error
Traceback (most recent call last):
File "/home/ayu/b.py", line 4, in
import matplotlib.pyplot as plt
File "/usr/local/lib/python3.10/site-packages/matplotlib/pyplot.py", line 2230, in
switch_backend(rcParams["backend"])
File "/usr/local/lib/python3.10/site-packages/matplotlib/pyplot.py", line 267, in switch_backend
class backend_mod(matplotlib.backend_bases._Backend):
File "/usr/local/lib/python3.10/site-packages/matplotlib/pyplot.py", line 268, in backend_mod
locals().update(vars(importlib.import_module(backend_name)))
File "/usr/local/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/usr/local/lib/python3.10/site-packages/matplotlib/backends/backend_tkagg.py", line 1, in
from . import _backend_tk
File "/usr/local/lib/python3.10/site-packages/matplotlib/backends/_backend_tk.py", line 7, in
import tkinter as tk
File "/usr/local/lib/python3.10/tkinter/init.py", line 37, in
import _tkinter # If this fails your Python may not be configured for Tk
ModuleNotFoundError: No module named '_tkinter'
Code for reproduction
Actual outcome
it gives me this error
Traceback (most recent call last):
File "/home/ayu/b.py", line 4, in
import matplotlib.pyplot as plt
File "/usr/local/lib/python3.10/site-packages/matplotlib/pyplot.py", line 2230, in
switch_backend(rcParams["backend"])
File "/usr/local/lib/python3.10/site-packages/matplotlib/pyplot.py", line 267, in switch_backend
class backend_mod(matplotlib.backend_bases._Backend):
File "/usr/local/lib/python3.10/site-packages/matplotlib/pyplot.py", line 268, in backend_mod
locals().update(vars(importlib.import_module(backend_name)))
File "/usr/local/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/usr/local/lib/python3.10/site-packages/matplotlib/backends/backend_tkagg.py", line 1, in
from . import _backend_tk
File "/usr/local/lib/python3.10/site-packages/matplotlib/backends/_backend_tk.py", line 7, in
import tkinter as tk
File "/usr/local/lib/python3.10/tkinter/init.py", line 37, in
import _tkinter # If this fails your Python may not be configured for Tk
ModuleNotFoundError: No module named '_tkinter'
Expected outcome
it should animate the chaos equation
https://upload.wikimedia.org/wikipedia/commons/1/13/A_Trajectory_Through_Phase_Space_in_a_Lorenz_Attractor.gif
Additional information
No response
Operating system
lubuntu20.04 (a fork of ubuntu20.04)
Matplotlib Version
3.5.1
Matplotlib Backend
agg
Python version
3.10.0
Jupyter version
i do not have install jupyter notebook
Installation
pip
The text was updated successfully, but these errors were encountered: