How to Solve NameError: name 'SpotifyOAuth' is not defined -- spotipy
Solution: Import the 'SpotifyOAuth' module
To Solve the error, add the following line to the top of your code.
from spotipy.oauth2 import SpotifyOAuth
For more information:
Python spotipy SpotifyOAuth