cannot import name 'ImageTK' - python 3.5

前端 未结 7 1668
忘掉有多难
忘掉有多难 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:40

    For Python3 on Ubuntu 18 I had to uninstall the Python (2) packages then install the Python 3 packages:

    apt-get remove python3-pil python3-pil.imagetk python-pil.imagetk python-pil
    apt-get install python3-pil.imagetk # Note that python3-pil installed as a dependency
    
    0 讨论(0)
提交回复
热议问题