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
I had this same problem on Windows 10 even after eliminating the --user part of the pip install command.  For some reason, installing pyaudio first resolved the problem with sounddevice.  Sounddevice continues to work even after uninstalling pyaudio.  They're both based on Portaudio so perhaps there's something shared in there, but I am not sure.
Python import sounddevice as sd (ImportError: No module name sounddevice)