정보/py

ImportError: failed to find libmagic. Check your installation

바다♬~♪ 2024. 10. 30. 23:03

Python 프로젝트 실행하면서 나타나는 오류

 

ImportError: failed to find libmagic.  Check your installation

 

OS환경은 윈도우에서 라이브러리를 설치하고 있는데.

위와 같은 메시지로 실행이 안되어 라이브러리 설치 명령어 시전

 

pip install libmagic

 

설치는 잘되었으나 실행하면 여전히 동일한 에러 발생

 

pip install pythonmagic

 

설치는 잘되었으나 실행하면 이것도 여전히 동일한 에러 발생

 

다른 라이브러리인 pylibmagic 설치하면 설치자체가 에러

 

pip install pylibmagic

 

이건 설치하닥 오류

ERROR: Failed to build installable wheels for some pyproject.toml based projects (pylibmagic)

 

결국 해결책은

pip install python-magic-bin