I am trying to install python-magic for Windows and I have followed all the instructions in https://github.com/ahupp/python-magic and repeated the process several times but I am still getting this error:
ImportError: failed to find libmagic. Check your installation
I have magic1.dll (along with the two other files the docs specified) in C:\Windows\System32 so I am not sure what the issue is. I would appreciate any help or workarounds.
Go here and download the file "python_magic_bin-0.4.14-py2.py3-none-win32.whl", then
pip install python_magic_bin-0.4.14-py2.py3-none-win32.whl
now python-magic
works
I know this is a Windows question, but i wanted to share a Debian solution:
apt-get install libmagic-dev
Kind regards.
The below original answer is now outdated. Please simply follow the instructions denoted under the "dependencies" section.
ORIGINAL ANSWER:
I was able to solve this problem by moving the 3 files from GNUWin32 project to a separate directory (not the \system32 directory the docs suggest) and adding them to the PATH environment variable
Follow the below steps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With