Heyy guys, I have a problem with opening .py files on mac. So if I just double click on the file, this error message pops up "The document XXX could not be opened. IDLE cannot open files in the “Python Script” format." 1
HOWEVER, if I open a python shell first from my application list. Then I can open the file by double clicking on it directly.
It seems that as long as there's a python shell open (empty new session or another opened file), the double clicking works. Otherwise it does not. I am using python 3.10 and Mac Big Sur 11.6.
Any idea what's wrong and how to fix it?
CodePudding user response:
It might happen for not including the PATH variable properly that you should have added for Python 3.10. I have seen the difference from the Windows Operating System as the normal procedures (Python 3.9 and earlier) don't work on them properly just out of the box. The users need to add the PATH variable properly for Python 3.10.
You can also check this thread also. Check the Update 2 on that thread. Please also let us know whether that fixed your problem or not.
CodePudding user response:
You can find an indepth solution to your problem here. https://bugs.python.org/issue38946