擅长:python、mysql、java
<p>嘿,你忘了在<code>picture1 = Label(image=img3)</code>中提到窗口名了</p>
<p>这是正确的一个错误</p>
<pre><code># this is the part for the image
img3 = PhotoImage(file=r"C:\\Tkinter\\ComputerImage.png ")
picture1 = Label(window2,image=img3)
picture1.pack()
</code></pre>
<p>和
<code>error error _tkinter.TclError: image "pyimage4" doesn't exist -</code>
您必须在第二个窗口中使用<code>Toplevel()</code></p>
<pre><code>window2=Toplevel ()
</code></pre>
<p>它对我有用</p>