It runs fine on another system. The issue is related to networkx when running a file or using Visual Studio Code. The simple "import networkx’ generates a dialog box (generated it appears from PySimpleGUI).
When the X is clicked in the upper right hand corner, another dialog box is popped-up with the heading “error creating layout window”. The dialog is from PySimpleGUI. PySimpleGui is not being imported so I have not idea what has triggered it.
The only way to get rid of the dialog box it through the use of Task Manager.
I do have PySimpleGUI on the system and I have used it in other applications.
I posted a lot more detail about my investigations as issue #4232 at https://github.com/networkx/networkx/issues.
I came to the conclusion that Python has been changed, but I do not know where to look or how to undo what is happening. Any help would be appreciated.