在虚拟环境中安装 PyObjC 时出错

Getting error in installing PyObjC in virtual environment

我创建了一个虚拟环境并做了一个语音助手。在尝试安装 PyObjC 时,出现以下错误。 我正在使用 windows.. 有什么替代方案吗?

 (venv) PS C:\Anirudh\Python\ani_speech_assistant> pip install PyObjC
    Collecting PyObjC
      Using cached pyobjc-6.2.2-py3-none-any.whl (2.9 kB)
    Collecting pyobjc-framework-InterfaceBuilderKit==6.2.2; platform_release >= "9.0" and platform_release < "11.0"
      Downloading pyobjc_framework_InterfaceBuilderKit-6.2.2-py2.py3-none-any.whl (5.8 kB)
    Collecting pyobjc-framework-XgridFoundation==6.2.2; platform_release < "12.0"
      Downloading pyobjc_framework_XgridFoundation-6.2.2-py2.py3-none-any.whl (5.1 kB)
    Collecting pyobjc-framework-LatentSemanticMapping==6.2.2
      Downloading pyobjc_framework_LatentSemanticMapping-6.2.2-py2.py3-none-any.whl (5.1 kB)
    Collecting pyobjc-framework-CoreAudioKit==6.2.2
      Downloading pyobjc-framework-CoreAudioKit-6.2.2.tar.gz (18 kB)
        ERROR: Command errored out with exit status 1:
         command: 'c:\anirudh\python\ani_speech_assistant\venv\scripts\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\aayan\AppData\Local\Temp\pip-install-mdbc0h_a\pyobjc-framework-coreaudiokit\setup.py'"'"'; __file__='"'"'C:\Users\aayan\AppData\Local\Temp\pip-install-mdbc0h_a\pyobjc-framework-coreaudiokit\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\aayan\AppData\Local\Temp\pip-pip-egg-info-rwdv5gvi'
             cwd: C:\Users\aayan\AppData\Local\Temp\pip-install-mdbc0h_a\pyobjc-framework-coreaudiokit\
        Complete output (7 lines):
        Traceback (most recent call last):
          File "<string>", line 1, in <module>
          File "C:\Users\aayan\AppData\Local\Temp\pip-install-mdbc0h_a\pyobjc-framework-coreaudiokit\setup.py", line 28, in <module>
            Extension(
          File "C:\Users\aayan\AppData\Local\Temp\pip-install-mdbc0h_a\pyobjc-framework-coreaudiokit\pyobjc_setup.py", line 420, in Extension
            if "clang" in get_config_var("CC"):
        TypeError: argument of type 'NoneType' is not iterable
        ----------------------------------------
    ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

您只能在 macos 中安装 PyObjC。我认为您正在 windows.

上尝试