cannot import name 'ImageTK' - python 3.5

前端 未结 7 1666
忘掉有多难
忘掉有多难 2020-12-17 16:02

I am trying to load in an image from the same folder as the one my python script is in.

# create a class called Person
# create init method
# 2 attributes (         


        
7条回答
  •  伪装坚强ぢ
    2020-12-17 16:25

    You will have to change the code like this:

    import PIL
    from PIL import ImageTk
    from PIL import Image
    

    It should work fine!

提交回复
热议问题