Skip to content

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

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
TheNoShade opened this issue Apr 8, 2024 · 2 comments · May be fixed by #294
Closed

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

TheNoShade opened this issue Apr 8, 2024 · 2 comments · May be fixed by #294

Comments

@TheNoShade
Copy link

I have docker based python project. When trying to import magic and up my container I'm facing below error

File "/usr/local/lib/python3.11/site-packages/magic/loader.py", line 49, in load_lib raise ImportError('failed to find libmagic. Check your installation') ImportError: failed to find libmagic. Check your installation

When I'm trying to install python-libmagic below error occurred

error: command '/usr/bin/gcc' failed with exit code 1 [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for cffi Running setup.py clean for cffi Successfully built python-libmagic Failed to build cffi ERROR: Could not build wheels for cffi, which is required to install pyproject.toml-based projects

I tried many things but all in vain. Please help to solve this issue. Thanks.

@ddelange
Copy link
Contributor

ddelange commented Apr 9, 2024

Hi @TheNoShade 👋

@ahupp
Copy link
Owner

ahupp commented May 26, 2024

Yes, ^^ that's true. Too many similarly named packages unfortunately.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants