How to use python-magic 5.19-1 – Stack Overflow

Do you have a magic.py file in the same directory as the one you launched the python shell from? The errors you got make it sound like you do (as I just got all your examples working). One way you can find out is import inspect then inspect.getfile(magic) and see whether this is the expected file for the magic module.

Read More