[GH-ISSUE #455] ImportError: No module named oauth2 #268

Closed
opened 2026-02-27 23:21:43 +03:00 by kerem · 2 comments
Owner

Originally created by @tgraf2 on GitHub (Mar 18, 2020).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/455

I recently installed spotipy using:
python -m pip install spotipy --user
which installed without errors. I then setup my spotify client ID and secret, and when I try to run the example given under "create a Spotify object and call methods" I get the following error:
ImportError: No module named oauth2
Any help on why I am getting this error? I am assuming the oauth2 module should have been installed when I installed spotipy.

Originally created by @tgraf2 on GitHub (Mar 18, 2020). Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/455 I recently installed spotipy using: **python -m pip install spotipy --user** which installed without errors. I then setup my spotify client ID and secret, and when I try to run the example given under "create a Spotify object and call methods" I get the following error: **ImportError: No module named oauth2** Any help on why I am getting this error? I am assuming the oauth2 module should have been installed when I installed spotipy.
kerem closed this issue 2026-02-27 23:21:43 +03:00
Author
Owner

@stephanebruckert commented on GitHub (Mar 18, 2020):

hmm oauth is part of spotipy so it shouldn't be missing.

If from your command line you run python alone, what do you get when you type the following?

>>> import spotipy
>>> spotipy.oauth2

Also please share the full stack traces (the one from the README example as well)

<!-- gh-comment-id:600843316 --> @stephanebruckert commented on GitHub (Mar 18, 2020): hmm oauth is part of spotipy so it shouldn't be missing. If from your command line you run `python` alone, what do you get when you type the following? ``` >>> import spotipy >>> spotipy.oauth2 ``` Also please share the full stack traces (the one from the README example as well)
Author
Owner

@tgraf2 commented on GitHub (Mar 18, 2020):

Hi Stéphane,

Thanks for getting back to me. I found the problem (my python script was named spotipy.py). When I renamed it everything worked.
Thanks again.

Terry

On Mar 18, 2020, at 4:29 PM, Stéphane Bruckert notifications@github.com wrote:

hmm oauth is part of spotipy so it shouldn't be missing.

If from your command line you run python alone, what do you get when you type the following?

import spotipy
spotipy.oauth2

Also please share the full stack traces (the one from the README example as well)


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

<!-- gh-comment-id:600846440 --> @tgraf2 commented on GitHub (Mar 18, 2020): Hi Stéphane, Thanks for getting back to me. I found the problem (my python script was named spotipy.py). When I renamed it everything worked. Thanks again. Terry > On Mar 18, 2020, at 4:29 PM, Stéphane Bruckert <notifications@github.com> wrote: > > > hmm oauth is part of spotipy so it shouldn't be missing. > > If from your command line you run python alone, what do you get when you type the following? > > >>> import spotipy > >>> spotipy.oauth2 > > Also please share the full stack traces (the one from the README example as well) > > — > You are receiving this because you authored the thread. > Reply to this email directly, view it on GitHub, or unsubscribe. >
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotipy#268
No description provided.