Reputation: 31
I want to install some modules for Telegram Bots and I always get errors like:
File "test.py", line 7, in <module>
import spotipy
ModuleNotFoundError: No module named 'spotipy'
I tried to install spotipy with pip, pip3 and apt.
How is it done? Or generally how do I import modules?
Thank you.
Upvotes: 1
Views: 4518
Reputation: 422
From the spotipy README:
If you already have Python on your system you can install the library simply by downloading the distribution, unpack it and install in the usual fashion:
python setup.py install
You can also install it using a popular package manager with
pip install spotipy
or
easy_install spotipy
Make sure your pip version matches your python version (pip --version
and python --version
should both be Python3 or Python2).
To import the module, use one of the following statements (see python3 documentation):
import numpy
import numpy as np
from numpy import array
Upvotes: 1