From 9398a9169614c8ec71ac0af23ece468ca2922872 Mon Sep 17 00:00:00 2001 From: greatx Date: Fri, 16 Dec 2022 00:06:20 +0800 Subject: [PATCH] fix AttributeError module 'distutils' has no attribute 'ccompiler' --- third_party/ctc_decoders/setup.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/third_party/ctc_decoders/setup.py b/third_party/ctc_decoders/setup.py index 9a8b292a0..c13f3df99 100644 --- a/third_party/ctc_decoders/setup.py +++ b/third_party/ctc_decoders/setup.py @@ -19,7 +19,8 @@ import os import platform import sys -from setuptools import distutils +import setuptools +from distutils import ccompiler from setuptools import Extension from setuptools import setup @@ -75,7 +76,7 @@ def compile_test(header, library): # hack compile to support parallel compiling -distutils.ccompiler.CCompiler.compile = parallelCCompile +ccompiler.CCompiler.compile = parallelCCompile FILES = glob.glob('kenlm/util/*.cc') \ + glob.glob('kenlm/lm/*.cc') \