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

No module named 'pychromecast' #11

Open
jfrench206 opened this issue Jul 6, 2018 · 6 comments
Open

No module named 'pychromecast' #11

jfrench206 opened this issue Jul 6, 2018 · 6 comments

Comments

@jfrench206
Copy link

jfrench206 commented Jul 6, 2018

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
Copy link
Owner

KeizerDev commented Jul 6, 2018

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

@jfrench206
Copy link
Author

jfrench206 commented Jul 9, 2018

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
Copy link
Owner

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
Copy link
Author

jfrench206 commented Jul 11, 2018

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
Copy link
Author

jfrench206 commented Jul 11, 2018

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
Copy link

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

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

3 participants