fatal error C1083: Cannot open include file: '

2019-08-22 10:44发布

问题:

trying to run a django server on my windows 10 computer.

When I execute python manage.py runserver, I get the following error:

fatal error C1083: Cannot open include file: 'magic.h': No such file or directory

I'm running 64 bit python 3.5, on Windows 10.

Here is the picture of the error:

回答1:

This issue was discussed in GitHub: https://github.com/ahupp/python-magic/issues/154

It seems that solution is to reinstall libmagic "pip install libmagic" and/or "pip install python-magic" (the environment I work with uses both) and download Windows-specific file from https://pypi.python.org/pypi/python-magic-bin/0.4.14 and install that with "pip install " to your Python-environment.