Skip to content

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

Closed
@TheNoShade

Description

@TheNoShade

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions