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

Failed to find magiclib #89

Closed
NatanSkl opened this issue Sep 19, 2017 · 9 comments
Closed

Failed to find magiclib #89

NatanSkl opened this issue Sep 19, 2017 · 9 comments

Comments

@NatanSkl
Copy link

I am running Windows 10 version 1703 with Python 3.6.2 installed.

I created a python script that uses eyeD3 simply by importing it after running pip install eyed3 which worked until I updated to version 1703.

Now when I try to run the script I get this output:

Traceback (most recent call last):
  File ".\script.py", line 6, in <module>
    import eyed3
  File "C:\Users\User\AppData\Local\Programs\Python\Python36-32\lib\site-packages\eyed3\__init__.py", line 35, in <module>
    from .utils.log import log                                            # noqa
  File "C:\Users\User\AppData\Local\Programs\Python\Python36-32\lib\site-packages\eyed3\utils\__init__.py", line 27, in <module>
    import magic
  File "C:\Users\User\AppData\Local\Programs\Python\Python36-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

I have tried reinstalling magiclib but it's not helping. What should I try?

@anujfr
Copy link

anujfr commented Sep 20, 2017

I had the same issue and I am on version 3.5.2.
While running the interpreter (not sure what the actual name is)
I tried importing eyed3 and this happened

>>> import eyed3
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Program Files\Python35\lib\site-packages\eyed3\__init__.py", line 35, in <module>
	from .utils.log import log                                            # noqa
  File "C:\Program Files\Python35\lib\site-packages\eyed3\utils\__init__.py", line 27, in <module>
	import magic
  File "C:\Program Files\Python35\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

But when I run this a test file with the following code in it

import eyed3

tag = eyeD3.Tag()
tag.link("To the Moon.mp3")
print tag.getArtist()

I get this error

	print tag.getArtist()
			^
SyntaxError: invalid syntax

@nicfit
Copy link
Owner

nicfit commented Sep 20, 2017

@GregSkl , You should be able to use 0.8.0, it has not dependency on libmagic. I added that last release because there were reports of sub-par mimetype detention on some systems. I'll make the use of libmagic optional in a later release. There are problems with lubmagic on Windows (#84) as well.

@anujfr , If you are using python 3 you must call print like a funciton. print(tag.artist)

@anujfr
Copy link

anujfr commented Sep 21, 2017

@nicfit downgraded to 0.8.0 and it works like a charm and thanks for the tip about the print function. I am not that familiar with python yet.

@NatanSkl
Copy link
Author

Thanks! It solved my issue

@francesco1119
Copy link

go here , download the file python_magic_bin-0.4.14-py2.py3-none-win32.whl then

pip install python_magic_bin-0.4.14-py2.py3-none-win32.whl

solution

One week of my life wasted for nothing...

@Val-777
Copy link

Val-777 commented Jan 30, 2018

Thank you Francesco, this solved my issue!

@nicfit
Copy link
Owner

nicfit commented Jan 31, 2018

Yes, thanks @francesco1119 and all. I have don't have Windows and never test on it.

I'll happily accept a PR that adds some Windows tips and tricks.

@nicfit nicfit mentioned this issue Feb 1, 2018
@nilknow
Copy link

nilknow commented Sep 27, 2019

I had the same issue and I am on version 3.5.2.
While running the interpreter (not sure what the actual name is)
I tried importing eyed3 and this happened

>>> import eyed3
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Program Files\Python35\lib\site-packages\eyed3\__init__.py", line 35, in <module>
	from .utils.log import log                                            # noqa
  File "C:\Program Files\Python35\lib\site-packages\eyed3\utils\__init__.py", line 27, in <module>
	import magic
  File "C:\Program Files\Python35\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

But when I run this a test file with the following code in it

import eyed3

tag = eyeD3.Tag()
tag.link("To the Moon.mp3")
print tag.getArtist()

I get this error

	print tag.getArtist()
			^
SyntaxError: invalid syntax

hey bro! I want to have a try on audio producing because of ' to the moon'. What a coincident:), and i guess you are Chinese too

@nilknow
Copy link

nilknow commented Sep 27, 2019

Thanks @francesco1119 . Using pip install python-magic-bin==0.4.14, i don't need to download whl file, it also works fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants