Python找不到存在的文件

Python(3.5)没有找到目录中的文件,我试图找出放在哪里的文件。 这是我得到的错误:

Traceback (most recent call last): File "/home/rik/Pillow/faces.py", line 35, in  from PIL import Image File "/home/rik/Pillow/PIL/Image.py", line 67, in  from PIL import _imaging as core ImportError: cannot import name '_imaging' 

但我在/ home / rik / Pillow /文件夹中有一个名为’_imaging.c’的文件,我试着将它放在/ home / rik / Pillow / PIL /中,但没有运气。

我试图通过strace跟踪它在哪里获取文件,但是我收到了一个错误:

 rik@rik-MS-7971:~$ chmod +x /home/rik/Documents/tensorflow/tensorflow/examples/tutorials/mnist/mnist_with_summaries.py rik@rik-MS-7971:~$ strace -f -e open /home/rik/Documents/tensorflow/tensorflow/examples/tutorials/mnist/mnist_with_summaries.py strace: exec: Exec format error 

您在下面的评论中提到您使用pip安装Pillow的原始问题,但是您安装了Python 3.5并且仅支持Python <= Python 3.4版本的pip3 install pillow

在所有当前支持的Ubuntu版本中,Pillow打包为python-pil和python3-pil,并且自Ubuntu 13.04以来,它已经替换了默认Ubuntu存储库中已停产的PIL项目。 你应该卸载你用pip安装的枕头,然后安装python-pil和/或python3-pil。