Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/user-interface/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python ModuleNotFoundError:没有名为';PIL';虽然安装了枕头_Python_User Interface_Tkinter_Python Imaging Library - Fatal编程技术网

Python ModuleNotFoundError:没有名为';PIL';虽然安装了枕头

Python ModuleNotFoundError:没有名为';PIL';虽然安装了枕头,python,user-interface,tkinter,python-imaging-library,Python,User Interface,Tkinter,Python Imaging Library,虽然我已经安装了枕头==7.2.0。我收到错误“modulenofounderror:没有名为'PIL'的模块”。我已重新安装了枕头,并多次重新启动笔记本电脑,但它不工作。导入部分如下所示: from tkinter import* from tkinter.messagebox import showinfo import random import time import PIL from PIL import Image,ImageTk import pygame 我的代码在几个月前运行

虽然我已经安装了
枕头==7.2.0
。我收到错误“
modulenofounderror:没有名为'PIL'的模块”
。我已重新安装了
枕头
,并多次重新启动笔记本电脑,但它不工作。导入部分如下所示:

from tkinter import*
from tkinter.messagebox import showinfo
import random
import time
import PIL
from PIL import Image,ImageTk
import pygame

我的代码在几个月前运行良好。但现在不行了。我无法修复此问题。

在哪个IDE中出现此错误?是否安装了超过1个python版本?pycharm community edition 2019.2.1是。。。我已经检查过我已经在您的vnv中安装了python 3.6.4(64位)、python 3.7.4(32位)、python 3.8.3(64位),请检查
pip freeze
&检查枕头是否存在。。。我认为枕头可以安装在不同的Python中您正在使用不同的python来运行此代码。。