When I am trying to open django admin panel this error is showing:
ImportError at /admin/
failed to find libmagic. Check your installation
Request Method: GET
Request URL: Django Version: 1.5.1
Exception Type: ImportError
Exception Value: failed to find libmagic. Check your installation
Exception Location: C:\Python27\lib\site-packages\magic.py in <module>, line 131
Python Executable: C:\Python27\python.exe
Python Version: 2.7.2
Python Path:
['C:\\Users\\farhan\\Downloads\\dist\\Django-1.5.1\\django\\bin\\mysite',
'C:\\Python27\\lib\\site-packages\\distribute-0.6.49-py2.7.egg',
'C:\\Windows\\system32\\python27.zip',
'C:\\Python27\\DLLs',
'C:\\Python27\\lib',
'C:\\Python27\\lib\\plat-win',
'C:\\Python27\\lib\\lib-tk',
'C:\\Python27',
'C:\\Python27\\lib\\site-packages',
'C:\\Python27\\lib\\site-packages\\setuptools-0.6c11-py2.7.egg-info']
Server time: Thu, 22 Aug 2013 13:19:01 +0600
Here is my traceback
Go here and then:
For Windoes 32bit, download the file "python_magic_bin-0.4.14-py2.py3-none-win32.whl" and run
pip install python_magic_bin-0.4.14-py2.py3-none-win32.whl
For Windows 64bit, download "python_magic_bin-0.4.14-py2.py3-none-win_amd64.whl" and run
pip install python_magic_bin-0.4.14-py2.py3-none-win_amd64.whl
now python-magic
works
EDIT: As suggested in the comments, this also works:
pip install python-magic-bin==0.4.14
Your multiuploader form uses python-magic library possibly for filetype identification. However you probably do not have all the missing dependencies installed. Please install the missing dependencies.
https://github.com/ahupp/python-magic#dependencies
As per the documentation (https://pypi.org/project/python-magic/) you have to install libmagic.
For Windows OS, you can do it by run the bellow command:
pip install python-magic-bin
And for Ubuntu based OS, you have to it by the bellow command:
sudo apt-get install libmagic1
From, your exception it is easy to say that, you are using Windows OS, so you have install it by the first command.
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