sbraz / pymediainfo

A Python wrapper around the MediaInfo library
https://pymediainfo.readthedocs.org/
Other
316 stars 57 forks source link

OSError: Failed to load library #103

Closed Sh1vam closed 3 years ago

Sh1vam commented 3 years ago
Traceback (most recent call last):
  File "<string>", line 3, in <module>
  File "/usr/local/lib/python3.9/dist-packages/pymediainfo/__init__.py", line 421, in parse
    lib, handle, lib_version_str, lib_version = cls._get_library(library_file)
  File "/usr/local/lib/python3.9/dist-packages/pymediainfo/__init__.py", line 323, in _get_library
    raise OSError("Failed to load library")
OSError: Failed to load library
sbraz commented 3 years ago

Hello, can you tell me how you installed pymediainfo and how you installed the libmediainfo?

Did you read the note here?

Without the library, this package cannot parse media files, which severely limits its functionality. Binary wheels containing a bundled library version are provided for Windows and Mac OS X. Packages are available for several major Linux distributions. They depend on the library most of the time and are the preferred way to use pymediainfo on Linux unless a specific version of the package is required.

Sh1vam commented 3 years ago

just i did pip install pymediainfo

sbraz commented 3 years ago

What about libmediainfo? If you're using any of the linux distributions listed here, you should install pymediainfo from the distribution's official repository.

Sh1vam commented 3 years ago

is libmediainfo a python library . ERROR: Could not find a version that satisfies the requirement libmediainfo ERROR: No matching distribution found for libmediainfo

How to install it from https://repology.org/project/python:pymediainfo/versions

sbraz commented 3 years ago

No, it is not a Python library, it is a C library on which pymediainfo relies. You need to install it with your package manager (I can't guess which one you're using but if you're running Debian, it should be apt install libmediainfo0v5 to get the library or apt install python3-pymediainfo to install pymediainfo).

Sh1vam commented 3 years ago

ohk thankyou sir