Reputation: 11
I'm very new in Python and I'm trying to install pyaudio and run it in spyder.
Every time I run it I get the following error:
File ~\AppData\Local\Programs\Python\Python313\Lib\site-packages\speech_recognition_init_.py:103 in get_pyaudio import pyaudio
File ~\AppData\Local\Programs\Python\Python313\Lib\site-packages\pyaudio_init_.py:111 import pyaudio._portaudio as pa
ModuleNotFoundError: No module named 'pyaudio._portaudio'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File ~\AppData\Local\Programs\Spyder\pkgs\spyder_kernels\py3compat.py:356 in compat_exec exec(code, globals, locals)
File c:\users\r_dua\appdata\local\programs\python\python313\lib\site-packages\speech_to_text_.py:35 reconhecer_e_transcrever()
File c:\users\r_dua\appdata\local\programs\python\python313\lib\site-packages\speech_to_text_.py:15 in reconhecer_e_transcrever with sr.Microphone() as source:
File ~\AppData\Local\Programs\Python\Python313\Lib\site-packages\speech_recognition_init_.py:75 in init self.pyaudio_module = self.get_pyaudio()
File ~\AppData\Local\Programs\Python\Python313\Lib\site-packages\speech_recognition_init_.py:105 in get_pyaudio raise AttributeError("Could not find PyAudio; check installation")
AttributeError: Could not find PyAudio; check installation
I tried different installations as:
pip install pipwin
pipwin install pyaudio
or if I do:
conda install pyaudio
I get the following mensages:
LibMambaUnsatisfiableError: Encountered problems while solving:
Could not solve for environment specs The following packages are incompatible ├─ pin-1 is installable and it requires │ └─ python 3.12.* , which can be installed; └─ pyaudio is not installable because there are no viable options ├─ pyaudio 0.2.11 would require │ └─ python >=2.7,<2.8.0a0 , which conflicts with any installable versions previously reported; ├─ pyaudio 0.2.11 would require │ └─ python >=3.10,<3.11.0a0 , which conflicts with any installable versions previously reported; ├─ pyaudio 0.2.11 would require │ └─ python >=3.11,<3.12.0a0 , which conflicts with any installable versions previously reported; ├─ pyaudio 0.2.11 would require │ └─ python >=3.5,<3.6.0a0 , which conflicts with any installable versions previously reported; ├─ pyaudio 0.2.11 would require │ └─ python >=3.6,<3.7.0a0 , which conflicts with any installable versions previously reported; ├─ pyaudio 0.2.11 would require │ └─ python >=3.7,<3.8.0a0 , which conflicts with any installable versions previously reported; └─ pyaudio 0.2.11 would require └─ python >=3.8,<3.9.0a0 , which conflicts with any installable versions previously reported.
I also installed other IDLE and in that case it works. I don't understand why it doesn't work with spyder.
Could you please give me a hand on this?
I tried different types of installations but it doesn't work.
Upvotes: 1
Views: 58