From d261d1e4672b63db851fa0b6a735b1c96044b31d Mon Sep 17 00:00:00 2001 From: virinci <104734512+virinci@users.noreply.github.com> Date: Wed, 11 Oct 2023 09:42:18 +0530 Subject: [PATCH] Fix ModuleNotFoundError: No module named 'distutils' (#2723) --- CONTRIBUTORS | 1 + qt/aqt/mpv.py | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 82648d859..34d815bb8 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -143,6 +143,7 @@ Sam Waechter Michael Eliachevitch Carlo Quick Dominique Martinet +Virinci ******************** diff --git a/qt/aqt/mpv.py b/qt/aqt/mpv.py index cae1201f9..9a246a961 100644 --- a/qt/aqt/mpv.py +++ b/qt/aqt/mpv.py @@ -36,10 +36,8 @@ import sys import tempfile import threading import time -from distutils.spawn import ( # pylint: disable=import-error,no-name-in-module - find_executable, -) from queue import Empty, Full, Queue +from shutil import which from typing import Optional from anki.utils import is_win @@ -78,7 +76,7 @@ class MPVBase: based JSON IPC. """ - executable = find_executable("mpv") + executable = which("mpv") popenEnv: Optional[dict[str, str]] = None default_argv = [