[Python] Debugging Python script in VS Code results in error: "macOS 11 (1107) or later...

Discussão em 'Python' iniciado por Stack, Agosto 31, 2025.

  1. Stack

    Stack Membro Participativo

    I am debugging a Python script with VS Code.

    Pyenv indicates that I am running Python 3.10.2:

    pyenv versions
    system
    3.7.7
    3.8.2
    3.9.1
    * 3.10.12 (set by /Users/scason/.python-version)
    3.11.4


    The Python script is using Tkinter.

    The following is basically the essential code...

    #!/usr/bin/env python3
    import random
    ##
    from tkinter import *
    from tkinter import ttk
    from tkinter import messagebox


    def genPW ():
    root = Tk() <=== this is where I get the error


    root.mainloop()


    def main() :
    genPW()

    if __name__ == '__main__':
    main ()


    I might add that the Python script does run and I am able to debug it in an Eclipse Python perspective.

    I have tried (re)setting peenv with different versions. I expect to be able to debug the script.

    Continue reading...

Compartilhe esta Página