KeizerDev / Rhythmbox-Chromecast

Send all your music to your Chromecast (Audio) within Rhythmbox
MIT License
23 stars 4 forks source link

No module named 'pychromecast' #11

Open jfrench206 opened 6 years ago

jfrench206 commented 6 years ago

Installed plugin using the readme instructions, I get this console error when trying to enable the plugin in Rhythmbox (also a red minus icon in the plugin list):

File "/home/jesse/.local/share/rhythmbox/plugins/chromecast/Chromecast.py", line 9, in \<module> import ChromecastSource File "/home/jesse/.local/share/rhythmbox/plugins/chromecast/ChromecastSource.py", line 4, in \<module> import pychromecast ImportError: No module named 'pychromecast'

However, when I enter a Python shell manually from command line and 'import pychromecast' I get no errors - doesn't seem to matter which directory I'm in (tried it from home directory, and from inside the rhythmbox plugin directory).

Ubuntu 16.04 LTS

KeizerDev commented 6 years ago

It probably depends on the python version. I think rhytmbox uses python2.7 so you should try pip2.7 install pychromecast

jfrench206 commented 6 years ago

Thanks for the suggestion! I tried running pip2.7 install pychromecast but got "Requirement already satisfied: pychromecast in /usr/lib/python2.7/dist-packages" and same error as previously described when trying to enable plugin in Rhythmbox. Anything else to try?

p.s. this might be helpful, there's more to the stack trace that I had not previously posted:

Traceback (most recent call last):
  File "/usr/lib/python3.5/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 665, in exec_module
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
  File "/home/jesse/.local/share/rhythmbox/plugins/chromecast/Chromecast.py", line 9, in <module>
    import ChromecastSource
  File "/home/jesse/.local/share/rhythmbox/plugins/chromecast/ChromecastSource.py", line 4, in <module>
    import pychromecast
ImportError: No module named 'pychromecast'
KeizerDev commented 6 years ago

According to File "/usr/lib/python3.5/importlib/__init__.py" in your stacktrace you're using Python 3.5, so if you run pip3.5 install pychromecast you should be good to go!

jfrench206 commented 6 years ago

Thank you! I'm a noob to this Python stuff. I tried that, but just got a bunch of "Requirement already satisfied" messages. I think this is because I was just messing with my pychromecast installation while trying to get mkchromecast to work - so I probably already updated it.

Now, when I try enabling the plugin in Rhythmbox, I get the following error:

[libprotobuf FATAL google/protobuf/stubs/common.cc:61] This program requires version 3.6.0 of the Protocol Buffer runtime library, but the installed version is 2.6.1. Please update your library. If you compiled the program yourself, make sure that your headers are from the same version of Protocol Buffers as your link-time library. (Version verification failed in "google/protobuf/descriptor.pb.cc".)

Strangely, pip show protobuf returns version 3.6.0...same with pip3.5 ...

jfrench206 commented 6 years ago

Oooooooh pip2.7 show protobuf gives 2.6.1. Onto something!

Bah, but when I uninstalled and updated it, I still get the same error in Rhythmbox. Now pip2.7 show protobuf gives 3.6.0 as well. I'm stumped!

PowaBanga commented 2 years ago

on my Archlinux, i juste installed python-pychromecast to solve this error message. I found it by typing "pychromecast archlinux" into google search...