I'm trying to run a django site as a personal project.
In Windows it runs fine, so I'm trying to test it on my Synology DS916+. I installled successfully this:
Python 3.8.3
Django 3.0.7
Pillow 7.2
But when I run python manage.py runserver, it returns this:
File "/volume1/WEBMI/webmi/lib/python3.8/site-packages/PIL/Image.py", line 93, in <module>
from . import _imaging as core
ImportError: cannot import name '_imaging' from 'PIL' (/volume1/WEBMI/webmi/lib/python3.8/site-packages/PIL/__init__.py)
This is part of Image.py
try:
# If the _imaging C module is not present, Pillow will not load.
# Note that other modules should not refer to _imaging directly;
# import Image and use the Image.core variable instead.
# Also note that Image.core is not a publicly documented interface,
# and should be considered private and subject to change.
from . import _imaging as core
if __version__ != getattr(core, "PILLOW_VERSION", None):
raise ImportError(
"The _imaging extension was built for another version of Pillow or PIL:\n"
"Core version: %s\n"
"Pillow version: %s" % (getattr(core, "PILLOW_VERSION", None), __version__)
)
except ImportError as v:
core = deferred_error(ImportError("The _imaging C module is not installed."))
# Explanations for ways that we know we might have an import error
if str(v).startswith("Module use of python"):
# The _imaging C module is present, but not compiled for
# the right version (windows only). Print a warning, if
# possible.
warnings.warn(
"The _imaging extension was built for another version of Python.",
RuntimeWarning,
)
elif str(v).startswith("The _imaging extension"):
warnings.warn(str(v), RuntimeWarning)
# Fail here anyway. Don't let people run with a mostly broken Pillow.
# see docs/porting.rst
raise
As you can see I ran it also in virtualenv with no success. Also tried to uninstall and install pillow several times without success.
It seems some dependency is broken but don't know which. I run out of ideas.
Thanks in advance