vaibkumr / yTermPlayer

Stream youtube playlists as audio on linux terminal
GNU General Public License v3.0
267 stars 22 forks source link

libmpv image not found when trying to run on a mac. #13

Closed juanfabrega closed 4 years ago

juanfabrega commented 5 years ago

Hey -- very excited to use this! Unfortunately have not gotten it to run yet.

I installed via pip and attempted to run but I get the following error:

Traceback (most recent call last):
  File "/usr/local/bin/yterm", line 6, in <module>
    from yTermPlayer.__main__ import main
  File "/usr/local/lib/python3.7/site-packages/yTermPlayer/__main__.py", line 11, in <module>
    from .music_api import YoutubePlayer
  File "/usr/local/lib/python3.7/site-packages/yTermPlayer/music_api.py", line 11, in <module>
    import mpv
  File "/usr/local/lib/python3.7/site-packages/mpv.py", line 11, in <module>
    backend = CDLL('libmpv.so')
  File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ctypes/__init__.py", line 356, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: dlopen(libmpv.so, 6): image not found

I have tried:

  1. Re-installing all dependencies one by one. Every time I am met with a Requirement already satisfied message.
  2. Reinstalling ffmpeg on my machine via sudo brew reinstall ffmpeg
  3. Reinstalling mpv on my machine via sudo brew reinstall mpv

Any idea what could be the problem? Thanks so much!

vaibkumr commented 5 years ago

OSError: dlopen(libmpv.so, 6): image not found could only mean you don't have mpv player installed on your OS but you already tried sudo brew reinstall mpv. Can you run mpv normally? For other tasks?

mdp18 commented 5 years ago

Getting the same issue. I'm able to run mpv normally for other tasks.

vaibkumr commented 5 years ago

Getting the same issue. I'm able to run mpv normally for other tasks.

Can you uninstall and reinstall both python-mpv with pip and the mpv player with you package manager. If you get an error in import mpv it's because of this dependency: https://github.com/jaseg/python-mpv I just tested it again on my system and it seems to run fine.

lihuelworks commented 4 years ago

Same thing, running on Kubuntu and the same message appears:

Traceback (most recent call last):
  File "/home/user/.local/bin/yterm", line 6, in <module>
    from yTermPlayer.__main__ import main
  File "/home/user/.local/lib/python3.7/site-packages/yTermPlayer/__main__.py", line 11, in <module>
    from .music_api import YoutubePlayer
  File "/home/user/.local/lib/python3.7/site-packages/yTermPlayer/music_api.py", line 11, in <module>
    import mpv
  File "/home/user/.local/lib/python3.7/site-packages/mpv.py", line 42, in <module>
    raise OSError("Cannot find libmpv in the usual places. Depending on your distro, you may try installing an "
OSError: Cannot find libmpv in the usual places. Depending on your distro, you may try installing an mpv-devel or mpv-libs package. If you have libmpv around but this script can't find it, maybe consult the documentation for ctypes.util.find_library which this script uses to look up the library filename.
vaibkumr commented 4 years ago

@lihuelworks There are two pip packages for mpv this shall solve the issue:

pip uninstall python-mpv mpv
pip install --user python-mpv