spotipy-dev / spotipy

A light weight Python library for the Spotify Web API
http://spotipy.readthedocs.org
MIT License
5k stars 953 forks source link

Module Spotipy does not exist #254

Closed Rikkaede closed 4 years ago

Rikkaede commented 6 years ago

`Traceback (most recent call last): File "C:/Users/Tims/Documents/Python/ss.py", line 2, in import spotipy ModuleNotFoundError: No module named 'spotipy'

Its saying the module does not exist.... I didn't actually code this by the way, its just one of spotify's example s. import sys import spotipy

if name == 'main': max_tracks_per_call = 50 if len(sys.argv) > 1: file = open(sys.argv[1]) else: file = sys.stdin tids = file.read().split()

sp = spotipy.Spotify()
for start in range(0, len(tids), max_tracks_per_call):
    results = sp.tracks(tids[start: start + max_tracks_per_call])
    for track in results['tracks']:
        print(track['name'] + ' - ' + track['artists'][0]['name'])

`

pl4nty commented 6 years ago

Did you run pip install spotipy?

HuzefaMandvi commented 6 years ago

If using python3 make sure to run pip3 install spotipy

mateusrangel commented 6 years ago

use pip install spotipy orpip3 install spotipy (if your system default python isn't python3)

you can check installed modules using pip freeze

mikechen66 commented 4 years ago

I am pleased to notify you that the following command include both Python2 and Python3 environbment.

$ pip install spotipy

You do not need use the command $ pip3 install spotify. The command of $ pip3 that installs spotify is wrong and incurs the error of import spotipy while you use the Python3 environment.

Please see the spotipy details as follows.

spotipy: https://github.com/joohoi/spotipy/tree/python3

sameehaafr commented 2 years ago

I'm still having an issue with using spotipy ini jupyter notebook. I installed it exactly as mentioned about and get the same error

stephanebruckert commented 2 years ago

This is possibly a common python issue unrelated with spotipy. Make sure you don't have another folder (maybe file?) in your project that's called spotipy.