I don't know why you're still seeing the attrdict3 error, but wxPython 4.2.0 isn't going to work with Python 3.11 anyway. I'd suggest using an older Python version, or you can use one of the wheels ...
I am trying to install wxPython using Python 3.5/Ubuntu 16.04. I tried to install it by using pip install wxpython, but I met this failure: Finished command: build_wx ...