I have python code that is running on raspberry pi B++ that uses the sounddevice library that lets you play and record sounds with python. I have successfully installed the modules. I can confirm through the python command line and enter import sounddevice as sd is works without errors. I have also confirmed by typing help ('modules') in python command line and sounddevice module appears. Only when I am running this code in an independent python program does the  ImportError: No module name sounddevice appear. 
Hope some one can help.
Here is the included code:
import sounddevice as sd
The error:
ImportError: No module name sounddevice
Hello After alot of trial and error I final solved it on the pip install sounddevice --user. 
You need to remove --user part so that the command is: pip install sounddevice . This installs it through out the entire system and works.
Python import sounddevice as sd (ImportError: No module name sounddevice)