[GH-ISSUE #34] [PYTHON3]Can't even import spotipy #16

Closed
opened 2026-02-27 23:20:24 +03:00 by kerem · 14 comments
Owner

Originally created by @maniexx on GitHub (Nov 4, 2014).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/34

I've installed spotipy using pip, no errors.
When I run python 3 and do import spotipy here's what I get:

File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.4/dist-packages/spotipy/__init__.py", line 2, in <module> from client import Spotify, SpotifyException ImportError: No module named 'client'

OS: Ubuntu 14.04,
Python: 3.4.0

Originally created by @maniexx on GitHub (Nov 4, 2014). Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/34 I've installed spotipy using pip, no errors. When I run python 3 and do `import spotipy` here's what I get: ` File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.4/dist-packages/spotipy/__init__.py", line 2, in <module> from client import Spotify, SpotifyException ImportError: No module named 'client' ` OS: Ubuntu 14.04, Python: 3.4.0
kerem closed this issue 2026-02-27 23:20:25 +03:00
Author
Owner

@joohoi commented on GitHub (Nov 4, 2014):

It's Python 2 only, my fork is ported to work with Python 3 also, check out https://github.com/joohoi/spotipy/tree/python3
Everything but examples should be Python 3 compatible.

<!-- gh-comment-id:61661411 --> @joohoi commented on GitHub (Nov 4, 2014): It's Python 2 only, my fork is ported to work with Python 3 also, check out https://github.com/joohoi/spotipy/tree/python3 Everything but examples should be Python 3 compatible.
Author
Owner

@joohoi commented on GitHub (Nov 4, 2014):

Now the examples are working too.

<!-- gh-comment-id:61664710 --> @joohoi commented on GitHub (Nov 4, 2014): Now the examples are working too.
Author
Owner

@maniexx commented on GitHub (Nov 4, 2014):

Ok, so that's weird because pip installed it in my python3 packages directory - python2 didn't even see it. @joohoi I will check out your fork, thanks.

<!-- gh-comment-id:61668720 --> @maniexx commented on GitHub (Nov 4, 2014): Ok, so that's weird because pip installed it in my python3 packages directory - python2 didn't even see it. @joohoi I will check out your fork, thanks.
Author
Owner

@lylia commented on GitHub (Feb 28, 2015):

you may install python 2 only, and unistall python3. because pip install in the last branch (which is python 3 in your case) .. lt'll be fixed ;)

<!-- gh-comment-id:76519419 --> @lylia commented on GitHub (Feb 28, 2015): you may install python 2 only, and unistall python3. because pip install in the last branch (which is python 3 in your case) .. lt'll be fixed ;)
Author
Owner

@maximd commented on GitHub (Jun 5, 2015):

Hi, could you maybe change the title of the issue to indicate that the problem appears with python 3?

I am really looking forward to an official python 3 support @plamere! Even if @joohoi support of python 3 is really great, maybe its work can be merged?

<!-- gh-comment-id:109100794 --> @maximd commented on GitHub (Jun 5, 2015): Hi, could you maybe change the title of the issue to indicate that the problem appears with python 3? I am really looking forward to an official python 3 support @plamere! Even if @joohoi support of python 3 is really great, maybe its work can be merged?
Author
Owner

@joohoi commented on GitHub (Jun 5, 2015):

My fork has been merged to the latest state, and pull request against it is created in PR #56

<!-- gh-comment-id:109252428 --> @joohoi commented on GitHub (Jun 5, 2015): My fork has been merged to the latest state, and pull request against it is created in PR #56
Author
Owner

@maximd commented on GitHub (Jun 5, 2015):

Let's hope it gets approved!

<!-- gh-comment-id:109259786 --> @maximd commented on GitHub (Jun 5, 2015): Let's hope it gets approved!
Author
Owner

@joohoi commented on GitHub (Jun 9, 2015):

Python 3 support has been merged to master.

@maniexx this issue should be solved.

<!-- gh-comment-id:110344930 --> @joohoi commented on GitHub (Jun 9, 2015): Python 3 support has been merged to master. @maniexx this issue should be solved.
Author
Owner

@urda commented on GitHub (Jul 2, 2015):

I can't seem to import this myself, unless the Python 3 support has not made it to the pip channels yet.

Error on import:

In [1]: import spotipy
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-bed053b53cb4> in <module>()
----> 1 import spotipy

/Users/purda/.virtualenvs/spotify/lib/python3.4/site-packages/spotipy/__init__.py in <module>()
      1 VERSION='2.0.1'
----> 2 from client import Spotify, SpotifyException

ImportError: No module named 'client'

Version Information:

Python 3.4.3

spotipy 2.3.6
<!-- gh-comment-id:118111320 --> @urda commented on GitHub (Jul 2, 2015): I can't seem to import this myself, unless the Python 3 support has not made it to the pip channels yet. Error on import: ``` python In [1]: import spotipy --------------------------------------------------------------------------- ImportError Traceback (most recent call last) <ipython-input-1-bed053b53cb4> in <module>() ----> 1 import spotipy /Users/purda/.virtualenvs/spotify/lib/python3.4/site-packages/spotipy/__init__.py in <module>() 1 VERSION='2.0.1' ----> 2 from client import Spotify, SpotifyException ImportError: No module named 'client' ``` Version Information: ``` bash Python 3.4.3 spotipy 2.3.6 ```
Author
Owner

@joohoi commented on GitHub (Jul 2, 2015):

Pip serves 2.3.6 which was released a week before the Python 3 support merge. So for the time being you're better off installing from github.

<!-- gh-comment-id:118125829 --> @joohoi commented on GitHub (Jul 2, 2015): Pip serves 2.3.6 which was released a week before the Python 3 support merge. So for the time being you're better off installing from github.
Author
Owner

@urda commented on GitHub (Jul 2, 2015):

@joohoi ok Just wanted to make sure! Saw this was still open but also saw the merge 😄

<!-- gh-comment-id:118126270 --> @urda commented on GitHub (Jul 2, 2015): @joohoi ok Just wanted to make sure! Saw this was still open but also saw the merge :smile:
Author
Owner

@brki commented on GitHub (Oct 8, 2015):

This issue could be closed now, no? I just did a pip install spotipy and spotipy 2.3.7 is installed.

<!-- gh-comment-id:146573520 --> @brki commented on GitHub (Oct 8, 2015): This issue could be closed now, no? I just did a `pip install spotipy` and spotipy 2.3.7 is installed.
Author
Owner

@yash2code commented on GitHub (Nov 22, 2017):

same issue

Traceback (most recent call last): File "/home/yash/MusicBot/musicbot.py", line 8, in <module> import spotipy ImportError: No module named spotipy

<!-- gh-comment-id:346274190 --> @yash2code commented on GitHub (Nov 22, 2017): same issue `Traceback (most recent call last): File "/home/yash/MusicBot/musicbot.py", line 8, in <module> import spotipy ImportError: No module named spotipy`
Author
Owner

@ritiek commented on GitHub (Nov 23, 2017):

@yash2code Try using python3 -m pip install spotipy.

<!-- gh-comment-id:346706940 --> @ritiek commented on GitHub (Nov 23, 2017): @yash2code Try using `python3 -m pip install spotipy`.
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#16
No description provided.