the-lay / ulauncher-spotify-api

Control Spotify clients on any device with ulauncher
https://ext.ulauncher.io/-/github-the-lay-ulauncher-spotify-api
MIT License
52 stars 2 forks source link

ModuleNotFoundError with spotipy installed. #13

Closed 7eith closed 3 years ago

7eith commented 3 years ago

Steps to reproduce

  1. Install module with Extensions (add extensions)
  2. Install SpotiPy with pip3 install -r requirements.txt
  3. Reinstall module

Environment

Ulauncher version: Extension API v2.0.0 Linux distro: Xubuntu 20.04.1 LTS (Focal Fossa) Desktop environment: XFCE - PyEnv (using 3.9.0 by default)

Logs

2020-12-09 17:58:59,902 | ERROR | ulauncher.api.server.ExtensionRunner: _run_process() | Extension "com.github.the-lay.ulauncher-spotify-api" exited instantly with code 1 2020-12-09 17:58:59,903 | ERROR | ulauncher.api.server.ExtensionRunner: _run_process() | Extension "com.github.the-lay.ulauncher-spotify-api" failed with an error: ModuleNotFoundError: No module named 'spotipy'

the-lay commented 3 years ago

Thank you for reporting the issue!

  1. Is it possible that you have multiple python installations on your system? It is possible that Ulauncher uses the default system python installation, while you've ran pip install on some venv or conda environment.

  2. When you ran pip3 install ... did spotipy module install sucesfully or were there any issues there? Can you try importing spotipy separately (python3 -> import spotipy)?

7eith commented 3 years ago

Hi, no issues when i install spotipy with pip3 install spotipy and importing separately?

the-lay commented 3 years ago

You mentioned that you are using PyEnv, so you definitely have multiple python environments on your system. Make sure you are installing spotipy library for the right python, the one that ulauncher uses. Most likely it is not the one that PyEnv provides (/home/USER/.pyenv/....), but the default one (/usr/bin/python3). If that is the case, you can try running /usr/bin/python3 -m pip install "spotipy>=2.16.1" "requests>=2.23.0" (this is an equivalent to pip3) and then retrying the plugin.

7eith commented 3 years ago

Thank's you, its working perfectly sorry for the useless issues good day

the-lay commented 3 years ago

No worries! Glad it worked out :)