scottlawsonbc / audio-reactive-led-strip

:musical_note: :rainbow: Real-time LED strip music visualization using Python and the ESP8266 or Raspberry Pi
MIT License
2.7k stars 642 forks source link

ModuleNotFoundError: No module named 'pyaudio' #285

Open manyaOnIsle opened 4 years ago

manyaOnIsle commented 4 years ago

I am having isuses while running the visualization.py I get the message ModuleNotFoundError: No module named 'pyaudio'

I am uaing anaconda on Windows 10 and i can seee that pyAudio is installed.

Can someone help me please

joeybab3 commented 4 years ago

Did you conda install pyaudio as well as pip install pyaudio?

manyaOnIsle commented 4 years ago

I did not do conda install pyaudio .. only did pip install pyaudio as what instruction stated .

but after this message I also tried that with no luck. I get Traceback (most recent call last): File "D:\audio-reactive-led-strip-master\python\visualization.py", line 7, in import microphone File "D:\audio-reactive-led-strip-master\python\microphone.py", line 3, in import pyaudio ModuleNotFoundError: No module named 'pyaudio'

joeybab3 commented 4 years ago

@manyaOnIsle The instructions state that if you are using anaconda you should do the following:

Install dependencies using pip and the conda package manager

conda install numpy scipy pyqtgraph
pip install pyaudio

Regardless it sounds like that wasn't the cause of your issue. What version of python are you running?

manyaOnIsle commented 4 years ago

@manyaOnIsle The instructions state that if you are using anaconda you should do the following:

Install dependencies using pip and the conda package manager

conda install numpy scipy pyqtgraph
pip install pyaudio

Regardless it sounds like that wasn't the cause of your issue. What version of python are you running?

Hi @joeybab3 thank for prompt response

as instructions said not to run conda install pyaudio

I did not do it .. I only ran the statements as stated above

Also I ran conda create --name visualization-env python=3.5 activate visualization-env

means in am creating an environment forcing the python version 3.5 (i think) hope that is correct.

I tried creating environment multiple times but hit the same issue.

joeybab3 commented 4 years ago

Apologies, you are 100% correct, I did not read closely enough into that line.

I remember having this issue with python 3, though I'm unsure what caused it and what I ended up doing to fix it.

I will poke around more when I get home as I only have a mac at work.

manyaOnIsle commented 4 years ago

Apologies, you are 100% correct, I did not read closely enough into that line.

I remember having this issue with python 3, though I'm unsure what caused it and what I ended up doing to fix it.

I will poke around more when I get home as I only have a mac at work.

much appreciate this @joeybab3.

I even tried with python version 2.7 without luck

one thing i observed is that unlike other packages pyaudio .py file is in the directory Anaconda3\envs\visualization-env\Lib\site-packages whereas other packages (eg. pyqtgraph) have their own folder. not sure whether this is of any relevance. so just to remove that from equation, i created pyaudio folder and copied the pyaudio.py in that but no luck :(

d-rez commented 4 years ago

You'll need to compile pyaudio

See https://stackoverflow.com/questions/51992375/python-package-installation-issues-pyaudio-portaudio

SimonHeiss1731 commented 3 years ago

@manyaOnIsle could you solve this problem? I'm facing the same currently..

manyaOnIsle commented 3 years ago

@manyaOnIsle could you solve this problem? I'm facing the same currently..

@SimonHeiss1731 - this was while before and i had some luck but do not remember. I moved to LEDFX and that is working quite well for me.

DarkLordKrish commented 3 years ago

I am facing the same problem and am unable to find a working solution.If anyone has found a solution,please help me

Sandeep-GitHubAccount commented 3 years ago

Install using below command

conda install -c anaconda pyaudio

huzaifa3564 commented 3 years ago

Umm I'm using VS code and I'm really new here. I was making an AI using Python. If someone can assist me please!

invant commented 3 years ago

Pyaudio package installation may fail so you can download pyaudio directly to path C:\Users\YOUR_COMP\AppData\Local\Programs\Python\Python37-32 from https://pypi.org/project/PyAudio/#files. Open cmd there and run. pip install PyAudio-0.2.11-cp36-cp36m-win_amd64.whl

fdciabdul commented 2 years ago
pip install pywin

pywin install pyaudio

this will save you

StandardV commented 2 years ago
pip install pywin

pywin install pyaudio

this will save you

I did just that but look like ModuleNotFoundError: No module named 'pyaudio' is what I got

fdciabdul commented 2 years ago
pip install pywin

pywin install pyaudio

this will save you

I did just that but look like ModuleNotFoundError: No module named 'pyaudio' is what I got

show your command and error log to here

sayamkeshri commented 2 years ago

Hey! I got a solution, I had this issue for a long time and after a bit of research everywhere, struggling for the answer, I used pip install pipwin pipwin install pyaudio @fdciabdul you were right but it is pipwin not pywin

StandardV commented 2 years ago

@sayamkeshri in some instances it might not work just like my case. I've try added it to path and it started working flawlessly