Home>

When I tried to run an application under Python, I got the following error:

****: ~/SemanticSegmentation $python3.5 main.py
Traceback (most recent call last):
File"main.py" ;, line 7, in<module>
from PIL import Image
File"/usr/lib/python3/dist-packages/PIL/Image.py" ;, line 60, in<module>
from. import _imaging as core
ImportError: cannot import name'_imaging'

After examining this ( https://www.tutorialfor.com/go.php?id=123146 ), it seems to be an import error in Pillow However, in another place (https://github.com/python-pillow/Pillow/issues/3088), it is considered as a problem under "_imaging.cpython-36m-x86_64-linux-gnu.so".

And so is in this environment.
./usr/lib/python3/dist-packages/PIL/_imaging.cpython-36m-x86_64-linux-gnu.so

Now how can we solve this problem?