macOS Monterey12.3
python3.10
At first, the atom-python-run in atom cannot run. After modifying the F5 command to python3 {file}, the program can be run, but an error is reported when opening a program with a relative path.
After testing, cd to the folder can run normally, but when opening through the path, the error FileNotFoundError: [Errno 2] No such file or directory: 'nihao.txt'
x=open('nihao.txt')
print(x)
Is there any way to make the program run by changing the mac settings without changing the program?