DanNixon / PlayMusicCL

A command line client for Google Play Music
Apache License 2.0
135 stars 21 forks source link

No module named glib #22

Closed jdivock closed 9 years ago

jdivock commented 9 years ago

On OSX:

Ran pip install playmusiccl with no issues, but when I run it I get the following

Traceback (most recent call last):
  File "/usr/local/bin/playmusiccl", line 9, in <module>
    load_entry_point('playmusiccl==0.6.1', 'console_scripts', 'playmusiccl')()
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 519, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2630, in load_entry_point
    return ep.load()
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2310, in load
    return self.resolve()
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2316, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/local/lib/python2.7/site-packages/playmusiccl/__init__.py", line 1, in <module>
    from playmusiccl import *
  File "/usr/local/lib/python2.7/site-packages/playmusiccl/playmusiccl.py", line 10, in <module>
    import glib
ImportError: No module named glib
jdivock commented 9 years ago

Alright, got it, was just homebrew shenanigans. Not sure if this needs to be in the readme, but I had to install these guys

brew install gst-python010 pygtk

before I could get going. Even then I get a number of warnings when running:

** Message: pygobject_register_sinkfunc is deprecated (GstObject)
** Message: pygobject_register_sinkfunc is deprecated (GstObject)
rothgar commented 9 years ago

seems odd that gtk would be needed for a cli tool. What do those packages actually provide? Trying to get this running in debian and getting the same import error.

DanNixon commented 9 years ago

IIRC pygtk provides the GStreamer bindings. I think there may be a better way to do this, but I don't have the time to look into it.

microlaser commented 9 years ago

I'm running ubuntu 14.04 and I got the same error, I overcame the problem with this command: sudo apt-get install python-gst*

This is probably overkill but it will work in a pinch.

DanNixon commented 9 years ago

This is mentioned in the readme now.