Spyder uses Qt — wxPython uses wxWidgets. Running both in the same process usually breaks (no window, freeze, crash). Here are the working workarounds.
%run your_script.py in that consoleimport wx
app = wx.App()
frame = wx.Frame(None, title="wxPython Test — Spyder 6", size=(400, 300))
panel = wx.Panel(frame)
txt = wx.StaticText(panel, label="If you see this window → it works!", pos=(20, 20))
frame.Show()
app.MainLoop()
Run with one of the two methods above.
Make sure wxPython is in the environment Spyder uses:
pip install wxPython
conda install -c conda-forge wxpython
Python versions that usually work well (2025–2026):
Using plain F5 in the default IPython console:
Reason: Qt + wxWidgets fighting over the main loop in the same process.
| Method | Reliability | Window appears? | Debugging possible? | Recommended? |
|---|---|---|---|---|
| F5 in default console | Low | Usually no | Yes | Avoid |
| F6 → Dedicated interpreter | High | Yes | Limited | Yes |
| F6 → External terminal | High | Yes | No | Yes (fallback) |
| Separate dedicated console | Medium-High | Yes | Yes | Good |