没有名为ConfigParser的模块

问题描述

我正在尝试安装端口音频,因为我的代码(使用pyaudio和语音识别)首先要构建和安装端口音频绑定。无论如何,当我说pip安装端口音频时,它是这样说的:

    ERROR: Command errored out with exit status 1:
     command: 'c:\users\stewa\appdata\local\programs\python\python38-32\python.exe' -c 'import sys,setuptools,tokenize; sys.argv[0] = '"'"'C:\\Users\\stewa\\AppData\\Local\\Temp\\pip-install-nkbwpxww\\audio.coders\\setup.py'"'"'; __file__='"'"'C:\\Users\\stewa\\AppData\\Local\\Temp\\pip-install-nkbwpxww\\audio.coders\\setup.py'"'"';f=getattr(tokenize,'"'"'open'"'"',open)(__file__);code=f.read().replace('"'"'\r\n'"'"','"'"'\n'"'"');f.close();exec(compile(code,__file__,'"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\stewa\AppData\Local\Temp\pip-pip-egg-info-y8d_hj4c'
         cwd: C:\Users\stewa\AppData\Local\Temp\pip-install-nkbwpxww\audio.coders\
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>",line 1,in <module>
      File "C:\Users\stewa\AppData\Local\Temp\pip-install-nkbwpxww\audio.coders\setup.py",line 5,in <module>
        import ConfigParser
    ModuleNotFoundError: No module named 'ConfigParser'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

我说没有名为ConfigParser的模块,您知道我应该做什么。如果使用python 3.8.5和Windows 10有帮助 谢谢

解决方法

该软件包很可能与python-3不兼容。

在Python-3中,stated in this answer ConfigParser已重命名为config-parser。 您可能要考虑通过python-2运行它(不建议使用,因为不建议使用),或者使用另一个更新的软件包(如果有)