I’m not able to duplicate this problem with just wxPython, however it looks like you are using something that is importing and using gtk-2.0
directly. I didn’t notice that when reading your first post. Anyway, it’s not too surprising that there are conflicts between gtk2 and gtk3 when they are both used in the same application. That would be like trying to use both tkinter and wxPython at the same time. If it works with Python3 then perhaps there is something different at a low level there, like better isolation between dynamically loaded libraries or something.
Below I show how I tested, by creating a new virtualenv, installing wxPython into it, and running a simple test from the command-line. Give that a try and see if it works for you. If you want to isolate where the problem comes from then you can incrementally add new packages and try again, also adding imports and test code as needed.
robind@debian:~/tmp$ python -m virtualenv Py27
Running virtualenv with interpreter /usr/bin/python2
New python executable in /home/robind/tmp/Py27/bin/python2
Also creating executable in /home/robind/tmp/Py27/bin/python
Installing setuptools, pkg_resources, pip, wheel...done.
robind@debian:~/tmp$ . Py27/bin/activate
(Py27) robind@debian:~/tmp$ which pip
/home/robind/tmp/Py27/bin/pip
(Py27) robind@debian:~/tmp$ pip install wxPython-4.0.7.post2-cp27-cp27mu-linux_x86_64.whl
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Processing ./wxPython-4.0.7.post2-cp27-cp27mu-linux_x86_64.whl
Collecting six
Downloading https://files.pythonhosted.org/packages/65/26/32b8464df2a97e6dd1b656ed26b2c194606c16fe163c695a992b36c11cdf/six-1.13.0-py2.py3-none-any.whl
Collecting pillow
Downloading https://files.pythonhosted.org/packages/1b/08/ff620ef5a6128ee6e7a505f5716f81fce7b71f3a69e99646ebe64e0b9984/Pillow-6.2.1-cp27-cp27mu-manylinux1_x86_64.whl (2.1MB)
|████████████████████████████████| 2.1MB 4.4MB/s
Collecting numpy<1.17; python_version <= "2.7"
Downloading https://files.pythonhosted.org/packages/d7/b1/3367ea1f372957f97a6752ec725b87886e12af1415216feec9067e31df70/numpy-1.16.5-cp27-cp27mu-manylinux1_x86_64.whl (17.0MB)
|████████████████████████████████| 17.0MB 11.5MB/s
Installing collected packages: six, pillow, numpy, wxPython
Successfully installed numpy-1.16.5 pillow-6.2.1 six-1.13.0 wxPython-4.0.7.post2
(Py27) robind@debian:~/tmp$
(Py27) robind@debian:~/tmp$ python -c "import sys,wx; print(sys.version); print(wx.version()); a=wx.App(); wx.Frame(None, title='Hello').Show(); a.MainLoop()"
2.7.13 (default, Sep 26 2018, 18:42:22)
[GCC 6.3.0 20170516]
4.0.7.post2 gtk3 (phoenix) wxWidgets 3.0.5