(M1 MBA 2020,MacOS 12.3.1)因此,在 Vs Code 内部,当我Python 3.8.9从我的解释器中选择解释器时usr/local/bin Tkinter,它会按照我想要的方式运行。
这是运行代码供参考。
当我尝试使用全局Python 3.8.9解释器(usr/bin/python3)时出现问题。当代码运行时,应用程序最终看起来像这样。
此外,当我运行代码时,终端会读取以下内容:
DEPRECATION WARNING: The system version of Tk is deprecated and may be removed in a future release. Please don't rely on it. Set TK_SILENCE_DEPRECATION=1 to suppress this warning.
Run Code Online (Sandbox Code Playgroud)
我怎样才能修复这个错误?或者更新我的全局 Tkinter 版本而不偏离Python 3.8.9. 此外,如果需要更多信息,我很乐意提供,抱歉我对这些东西不熟悉
应用程序中使用的软件包:tkinter、Pillow、tkmacosx
最后一件事,当我删除所有提及的软件包 Tkmacosx 时,该应用程序显示如下: