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

ImportError: failed to find libmagic. Check your installation #12

Closed
ghost opened this issue Aug 26, 2011 · 6 comments · May be fixed by #294
Closed

ImportError: failed to find libmagic. Check your installation #12

ghost opened this issue Aug 26, 2011 · 6 comments · May be fixed by #294

Comments

@ghost
Copy link

ghost commented Aug 26, 2011

install from latest source, it doesn't works on Mac OS X 10.6.8

$ python --version
Python 2.6.7


$ port info python26
python26 @2.6.7 (lang)
Variants:             ucs4, (-)universal

Description:          Python is an interpreted, interactive, object-oriented programming language.
Homepage:             http://www.python.org/

Library Dependencies: gettext, zlib, openssl, sqlite3, db46, ncurses, gdbm, bzip2, readline
Runtime Dependencies: python_select
Platforms:            darwin
License:              PSF
Maintainers:          [email protected], [email protected]

$ cd [proj source]
$ sudo python setup.py install 

$ python test.py 
Traceback (most recent call last):
  File "test.py", line 7, in <module>
    from magic import Magic, MagicException
  File "/Users/lee/Downloads/py_apps/python-magic/magic.py", line 128, in <module>
    raise ImportError('failed to find libmagic.  Check your installation')
ImportError: failed to find libmagic.  Check your installation
Lees-Box:python-magic lee$ python -c 'import magic'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "magic.py", line 128, in <module>
    raise ImportError('failed to find libmagic.  Check your installation')
ImportError: failed to find libmagic.  Check your installation
@ghost
Copy link
Author

ghost commented Aug 26, 2011

oh, it works well after I did following

$ sudo port install file

@ghost ghost closed this as completed Aug 26, 2011
@ghost
Copy link
Author

ghost commented Aug 26, 2011

I think you should update file README notify Mac OS X user python-magic requires package file.

@ahupp
Copy link
Owner

ahupp commented Aug 29, 2011

Do you have libmagic installed? Try 'sudo port install file'

On Fri, Aug 26, 2011 at 2:03 AM, shuge
[email protected]
wrote:

install from latest source, it doesn't works on Mac OS X 10.6.8

$ python --version
Python 2.6.7


$ port info python26
python26 @2.6.7 (lang)
Variants:             ucs4, (-)universal

Description:          Python is an interpreted, interactive, object-oriented programming language.
Homepage:             http://www.python.org/

Library Dependencies: gettext, zlib, openssl, sqlite3, db46, ncurses, gdbm, bzip2, readline
Runtime Dependencies: python_select
Platforms:            darwin
License:              PSF
Maintainers:          [email protected], [email protected]

$ cd [proj source]
$ sudo python setup.py install

$ python test.py
Traceback (most recent call last):
 File "test.py", line 7, in <module>
   from magic import Magic, MagicException
 File "/Users/lee/Downloads/py_apps/python-magic/magic.py", line 128, in <module>
   raise ImportError('failed to find libmagic.  Check your installation')
ImportError: failed to find libmagic.  Check your installation
Lees-Box:python-magic lee$ python -c 'import magic'
Traceback (most recent call last):
 File "<string>", line 1, in <module>
 File "magic.py", line 128, in <module>
   raise ImportError('failed to find libmagic.  Check your installation')
ImportError: failed to find libmagic.  Check your installation

Reply to this email directly or view it on GitHub:
#12

Adam Hupp | http://hupp.org/adam/

@gka
Copy link

gka commented Dec 22, 2012

or brew install file-formula

@ahupp
Copy link
Owner

ahupp commented Jun 3, 2013

I added docs for homebrew and macports to README.md

@DarkStar1
Copy link

@ahupp Thanks. This saved me time and a few hairs going grey

This issue was closed.
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

Successfully merging a pull request may close this issue.

3 participants