The system version of Tk is deprecated [duplicate]

I managed to solve the problem by installing python 3.7.7 from python.org. The path is now the same as on my MacBook Air.

The program is working very well now. I think the python3 command launches a system version of python and not the version installed by homebrew.