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来运行此代码。。