Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nothing worked #4

Open
XinyueZ opened this issue Sep 7, 2023 · 2 comments
Open

Nothing worked #4

XinyueZ opened this issue Sep 7, 2023 · 2 comments

Comments

@XinyueZ
Copy link

XinyueZ commented Sep 7, 2023

python obj_det_and_trk.py --weights yolov5s.pt --source ./assets/0_043.mp4 --blur-obj
Traceback (most recent call last):
  File "/home/ubuntu/work/yolov5-object-tracking/obj_det_and_trk.py", line 29, in <module>
    from sort import *
  File "/home/ubuntu/work/yolov5-object-tracking/sort.py", line 6, in <module>
    matplotlib.use('TkAgg')
  File "/home/ubuntu/miniconda3/envs/yolov5objtracking/lib/python3.9/site-packages/matplotlib/__init__.py", line 1237, in use
    plt.switch_backend(name)
  File "/home/ubuntu/miniconda3/envs/yolov5objtracking/lib/python3.9/site-packages/matplotlib/pyplot.py", line 279, in switch_backend
    raise ImportError(
ImportError: Cannot load backend 'TkAgg' which requires the 'tk' interactive framework, as 'headless' is currently running
@mahilaMoghadami
Copy link

hello
in sort.py file, change matplotlib.use('TKAgg') to matplotlib.use('Agg')
it works for me.

@animeesh
Copy link

commenting the whole line can also do!
#matplotlib.use('TkAgg')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants