我是Python的新手,并且在机器学习领域。我正在尝试安装pyaudio。我已经安装了Visual Studio,并尝试了所有在网上找到的帮助,但是仍然无法安装pyaudio。我正在使用pip安装pyaudio。请明确告诉我如何安装。我自己在网上学习,因此不需要任何外部帮助。我尝试使用步骤3中根据this website的步骤安装portaudio。它说portaudio文件具有步骤1和2的所有版本,我们可以跳过,但是之后我安装了cabal并尝试:
cabal install portaudio --extra-include-dirs="C:\PortAudio\include" --
extra-lib-dirs="C:\PortAudio\bin"
C:\>cabal install portaudio --extra-include-dirs="C:\PortAudio\include"
--extra-lib-dirs="C:\PortAudio\bin"
Resolving dependencies...
Downloading portaudio-0.2.4...
Configuring portaudio-0.2.4...
Failed to install portaudio-0.2.4
Build log ( C:\Users\lucifer\AppData\Roaming\cabal\logs\ghc-
8.4.3\portaudio-0.2.4-EzPLVoccDAb5giPv0bznbG.log ):
Configuring portaudio-0.2.4...
cabal.exe: Missing dependency on a foreign library:
* Missing (or bad) C library: portaudio
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library
is already installed but in a non-standard location then you can use the
flags--extra-include-dirs= and --extra-lib-dirs= to specify where it
is.If the library file does exist, it may contain errors that are caught
by the C compiler at the preprocessing stage. In this case you can re-
run configure with the verbosity flag -v3 to see the error messages.
cabal: Leaving directory 'C:\Users\lucifer\AppData\Local\Temp\cabal-
tmp-10840\portaudio-0.2.4'
cabal: Error: some packages failed to install:
portaudio-0.2.4-EzPLVoccDAb5giPv0bznbG failed during the configure
step. The
exception was:
ExitFailure 1