From 9da38a2db60749e686095ad107a3dc17c409d6b2 Mon Sep 17 00:00:00 2001 From: Wang Xin Date: Fri, 16 Dec 2022 11:39:47 +0800 Subject: [PATCH] fix AttributeError module 'distutils' has no attribute 'ccompiler' (#2745) --- 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 9a8b292a..c13f3df9 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') \