как установить portaudio, чтобы pyaudio можно было установить с помощью pip - PullRequest
0 голосов
/ 05 ноября 2018

Я новичок в Python, и я в области машинного обучения. Я пытаюсь установить pyaudio. Я установил Visual Studio и попробовал всю помощь, которую нашел в Интернете, но я до сих пор не могу установить pyaudio. Я использую pip для установки pyaudio. Пожалуйста, четко скажите мне, как я могу установить его. Я учусь самостоятельно в Интернете, поэтому не пользуюсь внешней помощью. Я попытался установить portaudio, используя шаги в соответствии с этим веб-сайтом в шаге 3. В нем говорилось, что файл 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
...