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

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

Closed
juanfabrega opened this issue Jul 16, 2019 · 5 comments
Closed

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

juanfabrega opened this issue Jul 16, 2019 · 5 comments

Comments

@juanfabrega
Copy link

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

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

mdp18 commented Aug 19, 2019

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

@vaibkumr
Copy link
Owner

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

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

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

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

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

4 participants