Spotipy: [PYTHON3]Can't even import spotipy

Created on 4 Nov 2014  路  14Comments  路  Source: plamere/spotipy

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

Most helpful comment

@yash2code Try using python3 -m pip install spotipy.

All 14 comments

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.

Now the examples are working too.

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.

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 ;)

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?

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

Let's hope it gets approved!

Python 3 support has been merged to master.

@maniexx this issue should be solved.

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

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.

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

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

same issue

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

@yash2code Try using python3 -m pip install spotipy.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

basophobic picture basophobic  路  5Comments

mcurranseijo picture mcurranseijo  路  3Comments

filipfigzalski picture filipfigzalski  路  4Comments

Jeoffreybauvin picture Jeoffreybauvin  路  4Comments

gauthamanms picture gauthamanms  路  3Comments