Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation fails #9

Open
cp2423 opened this issue Jan 10, 2021 · 7 comments
Open

Installation fails #9

cp2423 opened this issue Jan 10, 2021 · 7 comments

Comments

@cp2423
Copy link

cp2423 commented Jan 10, 2021

Hi, I note this extension is now under more active development within the last few days and am wondering if this is just an issue because some changes have not been merged in yet, but today I am getting the following error trying to install on a Raspberry Pi 4:

pi@raspberrypi:~ $ python3 -m pip install Mopidy-API-Explorer
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting Mopidy-API-Explorer
  Downloading https://files.pythonhosted.org/packages/99/41/16009b2208c3680028b151ea7a1f66c2ad3603bd58c8fadeb51d64b3df07/Mopidy-API-Explorer-1.0.1.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-40tbokiu/Mopidy-API-Explorer/setup.py", line 41, in <module>
        'Topic :: Multimedia :: Sound/Audio :: Players',
      File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 145, in setup
        return distutils.core.setup(**attrs)
      File "/usr/lib/python3.7/distutils/core.py", line 108, in setup
        _setup_distribution = dist = klass(attrs)
      File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 447, in __init__
        k: v for k, v in attrs.items()
      File "/usr/lib/python3.7/distutils/dist.py", line 292, in __init__
        self.finalize_options()
      File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 739, in finalize_options
        ep.load()(self, ep.name, value)
      File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 300, in check_entry_points
        pkg_resources.EntryPoint.parse_map(value)
      File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2503, in parse_map
        maps[group] = cls.parse_group(group, lines, dist)
      File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2477, in parse_group
        if not MODULE(group):
    TypeError: cannot use a string pattern on a bytes-like object
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-40tbokiu/Mopidy-API-Explorer/
@djmattyg007
Copy link
Contributor

We haven't published a new version to PyPI yet. There's a few small improvements I have that are pending. I'm hoping to get that finalised in the next few days, at which point we'll publish v2.0

@jakemauer
Copy link

Hey just checking in on this. What steps can I take to install this manually until it's updated to 2.0?

@janvda
Copy link

janvda commented Apr 13, 2021

I think i am getting same error when installing it in docker using following command:

# install mopidy-local and latest version of mopidy-cd extension
RUN python3 -m pip install mopidy-local Mopidy-API-Explorer git+https://github.com/antosart/mopidy-cd.git

This the docker output when building it:

Step 7/12 : RUN python3 -m pip install mopidy-local Mopidy-API-Explorer git+https://github.com/antosart/mopidy-cd.git
 ---> Running in 3065d2788b0c
Defaulting to user installation because normal site-packages is not writeable
Collecting git+https://github.com/antosart/mopidy-cd.git
  Cloning https://github.com/antosart/mopidy-cd.git to /tmp/pip-req-build-nvzkdi90
Collecting mopidy-local
  Downloading Mopidy_Local-3.2.1-py3-none-any.whl (30 kB)
Collecting Mopidy-API-Explorer
  Downloading Mopidy-API-Explorer-1.0.1.tar.gz (23 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-e9l75ytx/mopidy-api-explorer/setup.py'"'"'; __file__='"'"'/tmp/pip-install-e9l75ytx/mopidy-api-explorer/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-vc20tqmd
         cwd: /tmp/pip-install-e9l75ytx/mopidy-api-explorer/
    Complete output (23 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-e9l75ytx/mopidy-api-explorer/setup.py", line 41, in <module>
        'Topic :: Multimedia :: Sound/Audio :: Players',
      File "/usr/local/lib/python3.7/dist-packages/setuptools/__init__.py", line 165, in setup
        return distutils.core.setup(**attrs)
      File "/usr/lib/python3.7/distutils/core.py", line 108, in setup
        _setup_distribution = dist = klass(attrs)
      File "/usr/local/lib/python3.7/dist-packages/setuptools/dist.py", line 430, in __init__
        k: v for k, v in attrs.items()
      File "/usr/lib/python3.7/distutils/dist.py", line 292, in __init__
        self.finalize_options()
      File "/usr/local/lib/python3.7/dist-packages/setuptools/dist.py", line 721, in finalize_options
        ep(self)
      File "/usr/local/lib/python3.7/dist-packages/setuptools/dist.py", line 728, in _finalize_setup_keywords
        ep.load()(self, ep.name, value)
      File "/usr/local/lib/python3.7/dist-packages/setuptools/dist.py", line 305, in check_entry_points
        pkg_resources.EntryPoint.parse_map(value)
      File "/usr/local/lib/python3.7/dist-packages/pkg_resources/__init__.py", line 2553, in parse_map
        maps[group] = cls.parse_group(group, lines, dist)
      File "/usr/local/lib/python3.7/dist-packages/pkg_resources/__init__.py", line 2527, in parse_group
        if not MODULE(group):
    TypeError: cannot use a string pattern on a bytes-like object
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
WARNING: You are using pip version 20.2; however, version 21.0.1 is available.
You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.
ERROR: Service 'mopidy' failed to build : The command '/bin/sh -c python3 -m pip install mopidy-local Mopidy-API-Explorer git+https://github.com/antosart/mopidy-cd.git' returned a non-zero code: 1
Jans-MBP:nuc-jan-audio jan$ 

@janvda
Copy link

janvda commented Apr 13, 2021

I no longer get above error when installing it directly from github using following docker command (it also installs extensions mopidy-local and mopidy-cd.

RUN python3 -m pip install mopidy-local git+https://github.com/mopidy/mopidy-api-explorer.git  git+https://github.com/antosart/mopidy-cd.git

... but then following error is logged when the docker service becomes started (note that I don't have this error when I am not installing that extension)

Attaching to nuc-jan-audio_cd-auto-play_1, nuc-jan-audio_mopidy_1
mopidy_1        | INFO     2021-04-13 14:25:34,894 [7:MainThread] mopidy.__main__
mopidy_1        |   Starting Mopidy 3.0.2
mopidy_1        | ERROR    2021-04-13 14:25:35,455 [7:MainThread] mopidy.ext
mopidy_1        |   Setup of extension from entry point gmusic failed, ignoring extension.
mopidy_1        | Traceback (most recent call last):
mopidy_1        |   File "/usr/lib/python3/dist-packages/mopidy/ext.py", line 231, in load_extensions
mopidy_1        |     command = extension.get_command()
mopidy_1        |   File "/usr/local/lib/python3.7/dist-packages/mopidy_gmusic/__init__.py", line 55, in get_command
mopidy_1        |     from .commands import GMusicCommand
mopidy_1        |   File "/usr/local/lib/python3.7/dist-packages/mopidy_gmusic/commands.py", line 1, in <module>
mopidy_1        |     import gmusicapi
mopidy_1        |   File "/usr/local/lib/python3.7/dist-packages/gmusicapi/__init__.py", line 2, in <module>
mopidy_1        |     from gmusicapi.clients import Webclient, Musicmanager, Mobileclient
mopidy_1        |   File "/usr/local/lib/python3.7/dist-packages/gmusicapi/clients/__init__.py", line 1, in <module>
mopidy_1        |     from gmusicapi.clients.webclient import Webclient
mopidy_1        |   File "/usr/local/lib/python3.7/dist-packages/gmusicapi/clients/webclient.py", line 9, in <module>
mopidy_1        |     import gmusicapi.session
mopidy_1        |   File "/usr/local/lib/python3.7/dist-packages/gmusicapi/session.py", line 9, in <module>
mopidy_1        |     import gpsoauth
mopidy_1        |   File "/usr/local/lib/python3.7/dist-packages/gpsoauth/__init__.py", line 4, in <module>
mopidy_1        |     from . import google
mopidy_1        |   File "/usr/local/lib/python3.7/dist-packages/gpsoauth/google.py", line 4, in <module>
mopidy_1        |     from Cryptodome.PublicKey import RSA
mopidy_1        |   File "/usr/local/lib/python3.7/dist-packages/Cryptodome/PublicKey/RSA.py", line 42, in <module>
mopidy_1        |     from Cryptodome.Math.Numbers import Integer
mopidy_1        |   File "/usr/local/lib/python3.7/dist-packages/Cryptodome/Math/Numbers.py", line 34, in <module>
mopidy_1        |     from Cryptodome.Math._IntegerGMP import IntegerGMP as Integer
mopidy_1        |   File "/usr/local/lib/python3.7/dist-packages/Cryptodome/Math/_IntegerGMP.py", line 35, in <module>
mopidy_1        |     from Cryptodome.Util._raw_api import (backend, load_lib,
mopidy_1        |   File "/usr/local/lib/python3.7/dist-packages/Cryptodome/Util/_raw_api.py", line 86, in <module>
mopidy_1        |     ffi = FFI()
mopidy_1        |   File "/usr/local/lib/python3.7/dist-packages/cffi/api.py", line 56, in __init__
mopidy_1        |     backend.__version__, backend.__file__))
mopidy_1        | Exception: Version mismatch: this is the 'cffi' package version 1.14.1, located in '/usr/local/lib/python3.7/dist-packages/cffi/api.py'.  When we import the top-level '_cffi_backend' extension module, we get version 1.12.2, located in '/usr/lib/python3/dist-packages/_cffi_backend.cpython-37m-x86_64-linux-gnu.so'.  The two versions should be equal; check your installation.
mopidy_1        | INFO     2021-04-13 14:25:35,460 [7:MainThread] mopidy.config
mopidy_1        |   Loading config from builtin defaults
mopidy_1        | INFO     2021-04-13 14:25:35,464 [7:MainThread] mopidy.config
mopidy_1        |   Loading config from file:///config/mopidy.conf
mopidy_1        | INFO     2021-04-13 14:25:35,465 [7:MainThread] mopidy.config
mopidy_1        |   Loading config from command line options
mopidy_1        | WARNING  2021-04-13 14:25:35,473 [7:MainThread] mopidy.config
mopidy_1        |   Ignoring config section 'gmusic' because no matching extension was found
mopidy_1        | INFO     2021-04-13 14:25:35,473 [7:MainThread] mopidy.internal.path
mopidy_1        |   Creating dir file:///var/lib/mopidy/.cache/mopidy
mopidy_1        | INFO     2021-04-13 14:25:35,752 [7:MainThread] mopidy.ext
mopidy_1        |   Disabled extension api_explorer: Mopidy>=3.1.1 required, but found Mopidy 3.0.2 at /usr/lib/python3/dist-packages
mopidy_1        | INFO     2021-04-13 14:25:35,949 [7:MainThread] mopidy.__main__
mopidy_1        |   Enabled extensions: stream, http, local, iris, moped, spotify, m3u, cd, softwaremixer
mopidy_1        | INFO     2021-04-13 14:25:35,949 [7:MainThread] mopidy.__main__
mopidy_1        |   Disabled extensions: pandora, api_explorer, file, youtube, soundcloud
mopidy_1        | INFO     2021-04-13 14:25:36,051 [7:MainThread] mopidy.commands
mopidy_1        |   Starting Mopidy mixer: SoftwareMixer
mopidy_1        | INFO     2021-04-13 14:25:36,054 [7:MainThread] mopidy.commands
mopidy_1        |   Starting Mopidy audio
mopidy_1        | INFO     2021-04-13 14:25:36,056 [7:MainThread] mopidy.commands
mopidy_1        |   Starting Mopidy backends: M3UBackend, StreamBackend, SpotifyBackend, LocalBackend, CdBackend
mopidy_1        | INFO     2021-04-13 14:25:36,086 [7:MainThread] mopidy.internal.path
mopidy_1        |   Creating dir file:///var/lib/mopidy/data2/local
mopidy_1        | INFO     2021-04-13 14:25:36,086 [7:Audio-2] mopidy.audio.actor
mopidy_1        |   Audio output set to "tee name=t ! queue ! autoaudiosink t. ! queue ! udpsink host=0.0.0.0 port=5555"
mopidy_1        | INFO     2021-04-13 14:25:36,087 [7:SpotifyBackend-5] mopidy.internal.path
mopidy_1        |   Creating dir file:///var/lib/mopidy/.cache/mopidy/spotify
mopidy_1        | INFO     2021-04-13 14:25:36,101 [7:SpotifyBackend-5] mopidy.internal.path
mopidy_1        |   Creating dir file:///var/lib/mopidy/data2/spotify
mopidy_1        | INFO     2021-04-13 14:25:36,421 [7:SpotifyEventLoop] mopidy_spotify.backend
mopidy_1        |   Logged in to Spotify in online mode
mopidy_1        | INFO     2021-04-13 14:25:36,814 [7:SpotifyBackend-5] mopidy_spotify.web
mopidy_1        |   Logged into Spotify Web API as fvwcleibpdio8y1wroh2parf5
mopidy_1        | INFO     2021-04-13 14:25:36,854 [7:SpotifyBackend-5] mopidy_spotify.playlists
mopidy_1        |   Refreshed 0 Spotify playlists
mopidy_1        | INFO     2021-04-13 14:25:36,855 [7:MainThread] mopidy.commands
mopidy_1        |   Starting Mopidy core
mopidy_1        | INFO     2021-04-13 14:25:36,867 [7:MainThread] mopidy.commands
mopidy_1        |   Starting Mopidy frontends: HttpFrontend, IrisFrontend
mopidy_1        | INFO     2021-04-13 14:25:36,869 [7:HttpFrontend-13] mopidy.http.actor
mopidy_1        |   HTTP server running at [::ffff:0.0.0.0]:6680
mopidy_1        | INFO     2021-04-13 14:25:36,872 [7:IrisFrontend-14] mopidy_iris.core
mopidy_1        |   Starting Iris 3.50.0
mopidy_1        | INFO     2021-04-13 14:25:36,873 [7:MainThread] mopidy.commands
mopidy_1        |   Starting GLib mainloop
mopidy_1        | INFO     2021-04-13 14:25:36,875 [7:IrisFrontend-14] mopidy.internal.path
mopidy_1        |   Creating dir file:///var/lib/mopidy/data2/iris
mopidy_1        | INFO     2021-04-13 14:25:36,880 [7:HttpServer] mopidy.internal.path
mopidy_1        |   Creating dir file:///var/lib/mopidy/data2/http

@janvda
Copy link

janvda commented Apr 13, 2021

I managed to fix the error regarding the 'cffi' package version mismatch by following docker command which installs the correct cffi version:

RUN python3 -m pip install  mopidy-local  git+https://github.com/antosart/mopidy-cd.git \
                            cffi==1.12.2 git+https://github.com/mopidy/mopidy-api-explorer.git 

@LadnerJamie
Copy link

I managed to fix the error regarding the 'cffi' package version mismatch by following docker command which installs the correct cffi version:

RUN python3 -m pip install  mopidy-local  git+https://github.com/antosart/mopidy-cd.git \
                            cffi==1.12.2 git+https://github.com/mopidy/mopidy-api-explorer.git 

Thanks for the update. I experienced the same installation error and so installed with your suggested fix, after I installed git of course.

@orontee
Copy link

orontee commented May 18, 2023

We haven't published a new version to PyPI yet. There's a few small improvements I have that are pending. I'm hoping to get that finalised in the next few days, at which point we'll publish v2.0

@djmattyg007 I am not sure to understand the quoted text but it looks like you have an unpublished fix waiting for "small
improvements" to be implemented. Could you publish that fix (not necessarily going through a new release) so that this extension can be installed seamlessly?

AFAICT installing through the following works, thus just updating the README file could be enough:

python3 -m pip install git+https://github.com/mopidy/mopidy-api-explorer.git

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants