pip installing eyeD3 module. Failed to find libmag

2019-04-06 21:49发布

问题:

Trying to install eyed3 but it's giving me this error:

>>> import eyed3
Traceback (most recent call last):
  File "<pyshell#8>", line 1, in <module>
    import eyed3
  File "C:\Users\Dylan\AppData\Local\Programs\Python\Python35-32\lib\site-packages\eyed3\__init__.py", line 35, in <module>
    from .utils.log import log                                            # noqa
  File "C:\Users\Dylan\AppData\Local\Programs\Python\Python35-32\lib\site-packages\eyed3\utils\__init__.py", line 27, in <module>
    import magic
  File "C:\Users\Dylan\AppData\Local\Programs\Python\Python35-32\lib\site-packages\magic.py", line 176, in <module>
    raise ImportError('failed to find libmagic.  Check your installation')
ImportError: failed to find libmagic.  Check your installation

Here's the pip install:

I tried to uninstall with pip and delete all the eyed3 files, then re-install and it still gave the same error. It also does the same thing with easy_install.

回答1:

On Windows

You'll need DLLs for libmagic. @julian-r has uploaded a version of this project that includes binaries to pypi: https://pypi.python.org/pypi/python-magic-bin/0.4.14

pip install python-magic-bin==0.4.14

Works for me.



回答2:

I fixed it by installing libmagic with this command brew install libmagic



回答3:

You need to install libmagic before you install eye3d.

Here is a link to the git. https://github.com/ahupp/python-magic#dependencies

You can use this to install it:

pip install python-magic


标签: python pip